need help about External api login and NextAuth
Unanswered
Gray Partridge posted this in #help-forum
Gray PartridgeOP
my english is not good ,i will describe as i can
1st picture its external api login link if its success it will return user data and redirect to path "/acs/" only
2nd picture its external api login page (I have no involvement)
3rd i will get user data from external api login if i use POST method only so i create "/acs/route.ts" (server component)
4th user data example that i got from login by decoded from 3rd picture
5th how can i use these data to NextAuth ???
or how can i pass user data that i got from login to user to the rest of project that could be client component
Thanks you for every advices
1st picture its external api login link if its success it will return user data and redirect to path "/acs/" only
2nd picture its external api login page (I have no involvement)
3rd i will get user data from external api login if i use POST method only so i create "/acs/route.ts" (server component)
4th user data example that i got from login by decoded from 3rd picture
5th how can i use these data to NextAuth ???
or how can i pass user data that i got from login to user to the rest of project that could be client component
Thanks you for every advices
4 Replies
Gray PartridgeOP
bump
@Gray Partridge bump
are you able to get the user data in the nextjs server?
@ᴉuɐpɹɐɐ are you able to get the user data in the nextjs server?
Gray PartridgeOP
yes i got data from server side page (3rd picture)
i'm thinking i will leave nextauth behind , and just use userdata that i got from external api login , as cookie and store cookie in session from ironsession , maybe this could be the last thing that work i can do