🛠 Configurations
Sign-in with Google and Github (Only)
If you want your users to sign-in with Google and Github only, you can do so by updating the /app/auth/page.(tsx|tsx)
file.
Simply remove <CredentialsAuth />
and the import statement for it.
Before
After
Using just one provider
If you choose to use just one provider (e.g. Google), simply update the supportedOAuthProviders
array in the /src/components/auth/nextAuth/OAuth.(tsx | tsx)
file.
You could either set the available
property to false
or remove the provider from the array.
Then update the src/app/api/auth/[...nextauth]/options.(ts | js)
with the provider you want to use.
Which ever provider you choose to support make sure you have the environmental variables set inside
.env
file.
If all has been done properly, you should be left with either of the providers you choose to support. 🎉
Simply Visit the http://localhost:4000/auth
(opens in a new tab) route to see the changes.