Skip to content

REST API

All endpoints that NextAuth.js supports are also supported by nuxt-auth:

EndpointRequestDescription
${baseURL}/signinGETDisplays the built-in/unbranded sign-in
${baseURL}/signin/:providerPOSTStarts a provider-specific sign-in
${baseURL}/callback/:providerGET POSTHandles returning requests from OAuth services during sign-in
${baseURL}/signoutGET POSTDisplays the built-in/unbranded sign out
${baseURL}/sessionGETReturns client-safe session object
${baseURL}/csrfGETReturns object containing CSRF
${baseURL}/providersGETReturns a list of configured OAuth providers

The baseURL is /api/auth per default and can be configured in the nuxt.config.ts.

You can directly interact with these API endpoints if you wish to, it's probably a better idea to use useAuth where possible though. See the full rest API documentation of NextAuth.js here.

Released under the MIT License.