Can next-auth be used with a dotnet core api? #1270
Unanswered
jeremyjamez
asked this question in
Help
Replies: 1 comment
-
@jeremyjamez As I see it, this would be possible by creating your own adapter https://next-auth.js.org/tutorials/creating-a-database-adapter and instead of connecting to a database with the functions you would instead do API calls. In theory this could work, but you would need to protect those API's with an API-key since you can't rely on a user specific JWT token. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm building a website that uses DotNet Core 5.0 for the API and added Identity Authentication functionality, as I would like to store users in a sql server database. I see the docs for connecting next-auth to a sql server database but what about to an API instead?
I was wondering if next-auth can send the input to the API and manage the session from the token that is returned from the API upon successful login?
Just for clarification, there are other sections of the website that utilize the API, which is why I would prefer to handle authentication from the API.
Beta Was this translation helpful? Give feedback.
All reactions