Documentation home pagelight logodark logo
  • Support
  • Dashboard
  • Dashboard
createPAT()
Welcome
Getting Started
Products
Platform
Reference
Blog
  • Overview
Backend Services
  • Authentication
  • Storage
  • AI
Client Libraries
  • Javascript
    • nhost-js
    • Auth
      • HasuraAuthClient
      • changeEmail()
      • changePassword()
      • createPAT()
      • getAccessToken()
      • getAuthenticationStatus()
      • getDecodedAccessToken()
      • getHasuraClaim()
      • getHasuraClaims()
      • getSession()
      • getUser()
      • isAuthenticated()
      • isAuthenticatedAsync()
      • onAuthStateChanged()
      • onTokenChanged()
      • refreshSession()
      • resetPassword()
      • sendVerificationEmail()
      • signIn()
      • signInPAT()
      • signOut()
      • signUp()
      • addSecurityKey()
      • elevateEmailSecurityKey()
      • connectProvider()
      • signInEmailOTP()
      • verifyEmailOTP()
      • signInIdToken()
      • linkIdToken()
      • signInSecurityKey()
    • Storage
    • GraphQL
    • Functions
  • React
  • Next.js
  • Vue
  • React Native
CLI
  • Commands

createPAT()

Use nhost.auth.createPAT to create a personal access token for the user.

​
Parameters


expiresAt required Date

Expiration date for the token


metadata optional Record<string, string | number>

Optional metadata to store with the token


Was this page helpful?

Suggest editsRaise issue
changePassword()getAccessToken()
twittergithublinkedin
Powered by Mintlify
On this page
  • Parameters