Skip to content

How to create a custom sign-in page in Auth.js? #9189

@kjetilhartveit

Description

@kjetilhartveit

What is the improvement or update you wish to see?

The examples on https://authjs.dev/guides/basics/pages depicting custom sign-in pages "OAuth Sign In" and "Email Sign In" are no longer working because getProviders and getCsrfToken are no longer exported from next-auth/react.

They seem to be marked with @internal, maybe that's why they're not exported?

A type I also have used on the page which is missing is SignInErrorTypes which I previously imported from next-auth/core/pages/signin. This was useful to show the error message if there was an error in the query parameter. Although I wouldn't need the type if I just got an object with error types mapping to the error strings.

Is there any context that might help us understand?

I'm on next auth version 5.0.0-beta.3.

Does the docs page already exist? Please link to it.

https://authjs.dev/guides/basics/pages

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsRelates to documentationtriageUnseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions