JWT and Social Login Authentication
Danil0v3s opened this issue · comments
I'm trying to build a Spring Boot application that uses only Google and Facebook login and generate JWT tokens. This application will serve as a back-end for my app. I already have it running on NodeJS but I wanted to learn more about Spring Boot since it can be coded using Kotlin. The flow I'm using in my NodeJS server is the following:
- The user selects Facebook Login on the app and goes to facebook and it returns a Token;
- The app sends a request to the server in '/login/facebook' passing the Token somehow;
- The server checks if that token is valid by calling the Graph API '/me' request;
- If it's valid, then creates a new user, store it, authenticate and generate a JWT and send back to user.
But my problem is that I don't know what to search to achieve that. I don't want to someone to code everything for me and just send me the link, that would be great, but I want to learn, I'd like to know the steps I must take to make that work. Thanks in advance