yachnytskyi

yachnytskyi

Good tutorials/complex work auth in Elixir/Phoenix

Hello everyone. I am gonna start with Elixir/Phoenix, thinking to use Stephen Grider as a start point, then elixir school and other sources.
What I would like to find. I have been looking for a lot of tutorials, but can’t find something suitable for myself with Guardian or a similar library. I would like to implement a few projects like a blog, chat, etc. I have found already some solutions with building associations, many too many, one too many, direct SQL queries. But auth is a blind point for me. Because I will need not only to setup Guardian (or similar), but also secure my API routes (for example only authorized users can post messages, posts, comments, etc). Or a user must be authorized to watch their own messages. Sure I can just ignore auth now, but would like to start with it as well. Would be grateful for any help.

Most Liked Responses

yachnytskyi

yachnytskyi

Guys thanks you very much, appreciate your help. I will do it according to your recommendations. I really see that Elixir community is really friendly! Hope it’s also possible to find a job there with general background from Golang, Python and other languages.

D4no0

D4no0

I would recommend you to read on how Plugs work, once you understand that, you can simply read on how to use Guardian, either as a plug, or custom functionality inside your own custom plug.

al2o3cr

al2o3cr

None of the things you’ve described require Guardian.

I recommend starting with phx.gen.auth and writing straightforward code in your controllers / LiveViews to check “is there a user?” etc. When/if that starts to feel too complicated, then start looking for additional libraries; you’ll know what you need a lot better at that point.

Where Next?

Popular in Chat/Questions Top

pillaiindu
I am a VSCode and Sublime user and I know VIM, though I don’t use VIM directly but whenever I code inside Sublime or VSCode, I use Vim em...
New
Fl4m3Ph03n1x
Background Hey guys, recently I bought a book on TDD that I am reading. The books is really nice and has some really juicy things on arch...
New
roshan
Hi everyone, I’m looking for a book on Phoenix server hosting / deployment like the following books for Rails, Docker for Rails Develop...
New
LegitStack
I’m not a hugely experienced programmer, just a few years. So I’m looking for resources to learn about a topic but I can’t seem to find m...
New
KSingh1980
How to run the random query and get the result in JSON format and send it as a response. The query will be in the following form DB Name...
New
nur
https://e.planaria.network Build a NoSQL DB, Build a Relational SQL Database, Build a Graph Database, Build a File System, Build a Bitc...
New
asfand
I already created an Elixir Phoenix app for learning purpose. In this app students of our collage will create profiles, and will chat wit...
New
aswinmohanme
I recently finished the Udemy course on Elixir and Phoenix and I am thinking about using it for the next project. But I am stuck as how t...
New
TwistingTwists
I want to learn DSL. Don’t know how to write one. What;s the best introductory resource? I see some macro being used here. Is DSL only ...
New
AstonJ
It finally feels like I’ve got some time to catch up on my reading - though I am sure lots of people will be wondering the same: what are...
New

Other popular topics Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30877 112
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

We're in Beta

About us Mission Statement