react-auth-server icon indicating copy to clipboard operation
react-auth-server copied to clipboard

is authenticated middleware

Open leognmotta opened this issue 5 years ago • 0 comments

I was having a lot difficult to implement social login with my app, and you have already helped a lot, thanks! and I have already prototyped my own version and it works!

But how would you recommend me to make a middleware to check if the access_token being sent from my frontend is valid?

I am aware about google tokeninfo route that returns some data if we send a valid access_token and facebook has the sema approach. would you recommend to validate the request using those routes or there is something else?

google route: /oauth2/v1/tokeninfo?access_token=accessToken facebook route: /me?access_token=xxxxxxxxxxxxxxxxx github: GET /applications/:client_id/tokens/:access_token

sorry if I sound like noob, but I am :D

leognmotta avatar Sep 06 '19 17:09 leognmotta