I'm kind of new with oAuth2. I just want to ask if is it possible to use it together with JWT.
I'm currently using NextJS for front end and NestJS for backend.
For front end i'm using next-auth and for backend i'm using passport jwt strategy.
I'm planning to add sso on my frontend. retrieve data from social using oauth2 pass the data in back end and issue jwt tokens from my backend. so basically i'm thinking to use the oauth2 just to retrieve user name, email, picture only and pass these data in backend.
I know this is possible but is this a good practice?