Next-auth: OAuth sign in page fail

Created on 1 Jul 2020  路  1Comment  路  Source: nextauthjs/next-auth

I try create un page signin but not working

import React from 'react'
import { providers, signin } from 'next-auth/client'

export default ({ providers }) => {

  return (
    <>
      {Object.values(providers).map(provider => (
        <p key={provider.name}>
          <a href={provider.signinUrl} onClick={(e) => e.preventDefault()}>
            <button onClick={() => signin(provider.id)}>Sign in with {provider.name}</button>
          </a>
        </p>
      ))}
    </>
  )
}

export async function getServerSideProps (context) {
  return {
    props: {
      providers: await providers(context)
    }
  }
}

I'm used this example https://github.com/vercel/next.js/tree/canary/examples/with-next-auth

This is errors response

image

bug

Most helpful comment

Hi there! Please stay tuned for an update and some tutorials on how to create and use custom pages. We've had a lot of questions about custom pages and are making some changes to this in an upcoming release to address this.

>All comments

Hi there! Please stay tuned for an update and some tutorials on how to create and use custom pages. We've had a lot of questions about custom pages and are making some changes to this in an upcoming release to address this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eatrocks picture eatrocks  路  3Comments

Xetera picture Xetera  路  3Comments

ghoshnirmalya picture ghoshnirmalya  路  3Comments

dmi3y picture dmi3y  路  3Comments

iaincollins picture iaincollins  路  3Comments