Next.js Discord

Discord Forum

Vercel AI Chat github 0auth issue

Unanswered
Capelin posted this in #help-forum
Open in Discord
CapelinOP
On github when I am on local in the github 0auth call back http://localhost:3000/api/auth/callback/github and it work but now when I write https://MYAPP.vercel.app/api/auth/callback/github it doesn’t work someone have an idea ?

1 Reply

CapelinOP
in login-button there is this callback maybe it’s the reason it doesn’t work? But why adding something that doesn’t work?

export function LoginButton({ text = 'Login with GitHub', showGithubIcon = true, className, ...props }: LoginButtonProps) { const [isLoading, setIsLoading] = React.useState(false) return ( <Button variant="outline" onClick={() => { setIsLoading(true) // next-auth signIn() function doesn't work yet at Edge Runtime due to usage of BroadcastChannel signIn('github', { callbackUrl:/}) }} disabled={isLoading} className={cn(className)} {...props} > {isLoading ? ( <IconSpinner className="mr-2 animate-spin" /> ) : showGithubIcon ? ( <IconGitHub className="mr-2" /> ) : null} {text} </Button> ) }