providers/mattermost
default()β
default<
P
>(config
):OAuthConfig
<P
>
Add Mattermost login to your page.
Setupβ
Callback URLβ
https://example.com/api/auth/callback/mattermost
Configurationβ
import Auth from "@auth/core"
import Mattermost from "@auth/core/providers/mattermost"
const request = new Request(origin)
const response = await Auth(request, {
providers: [Mattermost({ clientId: MATTERMOST_CLIENT_ID, clientSecret: MATTERMOST_CLIENT_SECRET, issuer: MATTERMOST_ISSUER // The base url of your Mattermost instance. e.g `https://my-cool-server.cloud.mattermost.com` })],
})
Resourcesβ
Notesβ
By default, Auth.js assumes that the Mattermost provider is based on the OAuth 2 specification.
To create your Mattermost OAuth2 app visit http://<your Mattermost instance url>/<your team>/integrations/oauth2-apps
The Mattermost provider requires the issuer
option to be set. This is the base url of your Mattermost instance. e.g https://my-cool-server.cloud.mattermost.com
The Mattermost provider comes with a default configuration. To override the defaults for your use case, check out customizing a built-in OAuth provider.
If you think you found a bug in the default configuration, you can open an issue.
Auth.js strictly adheres to the specification and it cannot take responsibility for any deviation from the spec by the provider. You can open an issue, but if the problem is non-compliance with the spec, we might not pursue a resolution. You can ask for more help in Discussions.
Type parametersβ
Parameter |
---|
P extends MattermostProfile |
Parametersβ
Parameter | Type |
---|---|
config | OAuthUserConfig < P > & {issuer : string ;} |
Returnsβ
OAuthConfig
< P
>
MattermostProfileβ
Propertiesβ
create_atβ
create_at:
number
The time in milliseconds a user was created
delete_atβ
delete_at:
number
The time in milliseconds a user was deleted
update_atβ
update_at:
number
The time in milliseconds a user was last updated
terms_of_service_create_atβ
optional
terms_of_service_create_at:number
The time in milliseconds the user accepted the terms of service
terms_of_service_idβ
optional
terms_of_service_id:string
ID of accepted terms of service, if any. This field is not present if empty.