I am trying to create an application with passwordless authentication, with social medias like Facebook and by mail.
I'm stupidly stuck a one point, maybe I have not understand something.
Lets name my project MyApp:
If a user try to log to facebook from myapp.com/
, he will be redirected to facebook.com/login
, then facebook redirect him to myapp.com/callback
.
So, on my server, the route /
and /callback
are quite the same: they just send my React app to he user, but /callback
generate a JWT token.
From here is my problem : How can I send my JWT token to the client in the same time that the React app?
Maybe I have missed something from another provider, but the passwordless principle by mail is the same thing : just a link to authenticate the user, and just a redirection to the /callback
, no external provider.
I'm completely lost :(
Thank you!