Edit

Share via


NodeAuthOptions type

  • clientId - Client id of the application.
  • authority - Url of the authority. If no value is set, defaults to https://login.microsoftonline.com/common.
  • knownAuthorities - Needed for Azure B2C and ADFS. All authorities that will be used in the client application. Only the host of the authority should be passed in.
  • clientSecret - Secret string that the application uses when requesting a token. Only used in confidential client applications. Can be created in the Azure app registration portal.
  • clientAssertion - A ClientAssertion object containing an assertion string or a callback function that returns an assertion string that the application uses when requesting a token, as well as the assertion's type (urn:ietf:params:oauth:client-assertion-type:jwt-bearer). Only used in confidential client applications.
  • clientCertificate - Certificate that the application uses when requesting a token. Only used in confidential client applications. Requires hex encoded X.509 SHA-1 or SHA-256 thumbprint of the certificate, and the PEM encoded private key (string should contain -----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY----- )
  • protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.
  • skipAuthorityMetadataCache - A flag to choose whether to use or not use the local metadata cache during authority initialization. Defaults to false.
  • encodeExtraQueryParams - A flag to choose whether to encode extra query parameters in the request URL. Defaults to false.
type NodeAuthOptions = {
  authority?: string
  authorityMetadata?: string
  azureCloudOptions?: AzureCloudOptions
  clientAssertion?: string | ClientAssertionCallback
  clientCapabilities?: string[]
  clientCertificate?: {
    privateKey: string
    thumbprint?: string
    thumbprintSha256?: string
    x5c?: string
  }
  clientId: string
  clientSecret?: string
  cloudDiscoveryMetadata?: string
  encodeExtraQueryParams?: boolean
  knownAuthorities?: string[]
  protocolMode?: ProtocolMode
  skipAuthorityMetadataCache?: boolean
}