Skip to content

Can I build an authentication package/app to share user data and auth across all apps? #825

Closed Answered by isaaccustodio
theotarr asked this question in Help
Discussion options

You must be logged in to vote

I am building a turborepo with four Next.js apps that all require user login and authentication. I am using Prisma with Postgres and Next Auth for authentication and I would like to build one auth app that handles all authentication. Basically, a custom wrapper for Next Auth that takes in a redirect callback URL and redirects the user to that URL after being authenticated. Are there any examples or resources to do this? I this wrapper could and should probably be a custom express server that takes these params and creates the necessary Next Auth redirect.

Yes you can build an authentication service package, and share data with any package you want, exporting it from your new auth workst…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@isaaccustodio
Comment options

Comment options

You must be logged in to vote
2 replies
@Mac-DevOSYandex
Comment options

@pantharshit007
Comment options

Answer selected by anthonyshew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
5 participants