Skip to main content
Docs

create()

Creates a new .

function create(params: CreateOAuthApplicationParams): Promise<OAuthApplication>
  • Name
    name
    Type
    string
    Description

    The name of the OAuth application.

  • Name
    redirectUris?
    Type
    string[] | null
    Description

    An array of redirect URIs for the OAuth application.

  • Name
    scopes?
    Type
    string[] | null | undefined
    Description

    Scopes for the OAuth application. Available scopes are profile, email, public_metadata, private_metadata. Defaults to profile email. Provide the requested scopes as a string, separated by spaces.

  • Name
    consentScreenEnabled?
    Type
    boolean | null | undefined
    Description

    Specifies whether the consent screen should be displayed in the authentication flow. Cannot be disabled for dynamically registered OAuth applications. Defaults to true.

  • Name
    public?
    Type
    boolean | null | undefined
    Description

    Indicates whether the client is public. If true, the Proof Key of Code Exchange (PKCE) flow can be used.

Note

Importing clerkClient varies based on your framework. Refer to the for usage details, including guidance on .

const response = await clerkClient.oauthApplications.create({
  name: 'oauthapp_123',
  redirect_uris: [''],
  scopes: 'profile email public_metadata',
  public: null,
})

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint POST/oauth_applications. See the BAPI reference for more information.

Feedback

What did you think of this content?

Last updated on