-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
questionAsk how to do something or how something worksAsk how to do something or how something works
Description
Your question
I want to design a custom Signin page to add the site brand. The custom CSS and text that I add are not getting displayed.
What are you trying to do
In Pages/auth/signin.js, I added a div <div>Custom Signin Page</div>. But this is not displayed in the signin page.
Here is the repository.
https://github.com/rnarayan/NextJS-TailwindCSS-Mongoose-Next-Auth-Template/tree/NextAuth-CustomSigninPage
import React from 'react'
import { providers, signIn } from 'next-auth/client'
export default function SignIn({ providers }) {
console.log('Custom Signin page was called.')
return (
<>
<div>Custom Signin Page</div>
{Object.values(providers).map(provider => (
<div key={provider.name}>
<button onClick={() => signIn(provider.id)}>Sign in with {provider.name}</button>
</div>
))}
</>
)
}
SignIn.getInitialProps = async (context) => {
return {
providers: await providers(context)
}
}
Feedback
Documentation refers to searching through online documentation, code comments and issue history. The example project refers to next-auth-example.
- Found the documentation helpful
- Found documentation but was incomplete
- Could not find relevant documentation
- Found the example project helpful
- Did not find the example project helpful
Metadata
Metadata
Assignees
Labels
questionAsk how to do something or how something worksAsk how to do something or how something works