Next-auth with Spring Boot oauth
Unanswered
Spectacled bear posted this in #help-forum
Spectacled bearOP
Hi, im using spring boot oauth2 for authentication with nextjs frontend. I want to use next-auth for the flow. Can anyone recommend any resources?
8 Replies
Spectacled bearOP
im using my own oauth flow from backend side i.e spring boot, now the thing is everything happens at backend, i just need to redirect my client to backend and from there it takes the google acc and returns me the jwt token upon success. Now how do i integrate this with next-auth?
Make the auth on nextjs, later u can make fetchs to the backend and pass the session...
Also u can use a db adapter to access data from ur backend https://authjs.dev/getting-started/adapters
Spectacled bearOP
@ReverseGem7 So you are saying to authenticate the user on nextjs instead of spring boot?
@Spectacled bear <@453614925110050816> So you are saying to authenticate the user on nextjs instead of spring boot?
Yes, in my opinion this approach is more simple and fast
Spectacled bearOP
thanks @ReverseGem7