Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: SQlite+SignIn ! #31

Closed
mehdi-cit opened this issue Sep 11, 2023 · 3 comments
Closed

BUG: SQlite+SignIn ! #31

mehdi-cit opened this issue Sep 11, 2023 · 3 comments

Comments

@mehdi-cit
Copy link

Hello and thank you for this promissing project!
Followed the Demo but picked Sqlite and no third party auth provider (assuming it will simply use the sqlite for authentication).
Importing the provided SignIn and using it on the Home page works well (as shown in the DEMO).
However, clicking on the SignIn button leads to "the" error page: http://localhost:3000/api/auth/error
No info in the console log. Inspecting the Network tab shows a 200 OK request to http://localhost:3000/**api/auth/providers** followed immediately by redirection to the error page: http://localhost:3000/**api/auth/error**
image

@nicoalbanese
Copy link
Owner

Hey Mehdi - thanks for the issue. Just to clarify, did you install next-auth but didn't select any auth-providers (github, discord etc.)? If that is the case, you would have to pick a provider because this error would be as a result of not having any providers to sign you in with.

@mehdi-cit
Copy link
Author

mehdi-cit commented Sep 11, 2023

I did as per the demo (almost since the options were not proposed in the same order). I did not pick any of the proposed auth providers (Github, Google, Apple, discord ...). I assumed the "normal" username/email + password would be a default!
Are you saying one MUST pick a third party provider?
PS: yes, next-auth is installed:
"next-auth": "^4.23.1",

@nicoalbanese
Copy link
Owner

That is correct, yes. For email sign in, you have to configure either credentials or email-magic-link signin (https://authjs.dev/getting-started/email-tutorial?frameworks=next).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants