script

script

Using Aws cognito for server side rendering application

Hi,
I have never used aws cognito in any application, but I will be using soon. Currently I am using pow for handling authentication stuff in the web application. The documentation that I read so far for aws cognito describe tokens that we get from aws after successfully authenticating the user, but I couldn’t figure out how to use those tokens in the forms for authenticating the user, and managing their access.
I didn’t find much stuff on this topic either.
I am just looking for the flow how to do that?
What kind of plugs I need to add in the browser pipeline?
Where to store the tokens after user signed in?
How to pass them around?
Any thoughts or experience you could share would be much appreciated.
Thank you.

Most Liked

Sebb

Sebb

We once used Cognito together with the Authenticate action in an ELB. It does not get easier.

rogerweb

rogerweb

Unfortunately my experience is limited to the verification of tokens in the backend, so I might not be able to help much. Anyway, have you checked all the flows in Cognito’s documentation? I would also check how Phoenix handles sessions ( mix phx.gen.auth — Phoenix v1.8.8). It might be the case you won’t be storing tokens nor passing them around. Instead, you would be using the token to create a session for your user and then a session id in a cookie would be all you need.

Where Next?

Popular in Questions Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
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
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44167 214
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
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