I want to add facebook/google login to my flutter app. If i understand it correctly i should:
- Auth with either facebook or google to get accessToken(using flutter package like flutter_facebook_login)
- get token from auth response(inside the app)
- send token to phoenix rest api endpoint
- check token for validity against google/facebook api and get back data like email or avatar(from the server)
- create user in db
- return back my own auth and refresh tokens created by pow library?
- subsequent requests use my own tokens and not provider ones?
is this how it should work? Is my understanding correct or are there other/better ways to accomplish what i want? where does pow_assent fit in steps 4-6? Any resources describing such flow?