theyokohamalife
Authorizing a Mobile App
I have a mobile app that I’m working on that uses oauth to authenticate through Google. It receives an id_token from Google that I’d like to send to a Phoenix API for validation. Let’s say the endpoint is /mobile-api. How could the back end verify with Google that the mobile app and id_token are valid?
I tried to use Joken, but the documentation was too hard for someone new to Elixir and Phoenix (such as myself) to understand. The same goes for Jose.
Any help on how to get either of those or another alternative working would be greatly appreciated!
Most Liked
outlog
take a look at this Elixir learning: An Ueberauth Oauth 2 Walkthrough
basically you are doing oauth - try and get it working in the normal browser, and then do the mobile app..
outlog
ahh I see..
think you can use this to check the token:
# userinfo_endpoint from https://accounts.google.com/.well-known/openid-configuration
path = "https://www.googleapis.com/oauth2/v3/userinfo"
resp = Ueberauth.Strategy.Google.OAuth.get(token, path)
and then go from there..
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









