providers/nextcloud
NextcloudProfile
Represents the Nextcloud user profile data returned from the /ocs/v1.php/cloud/users/
.
See
Check out the documentation for more details
Extends
Record
<string
,any
>
Properties
address
address: string;
The address of the user.
Example
"Foobar 12, 12345 Town"
biography
biography: string;
The biography or detailed description of the user.
displayname
displayname: string;
The display name of the user.
Example
"Frank K."
email: null | string;
The email address associated with the user.
Example
"frank@domain.tld"
enabled
enabled: boolean;
Indicates whether the user account is enabled or disabled.
Example
true
fediverse
fediverse: string;
The user’s Fediverse handle.
groups
groups: string[];
An array of group names that the user belongs to.
Example
["admin", "group1", "group2"]
headline
headline: string;
The headline or brief description of the user.
id
id: string;
The user’s username.
Example
"frank"
language
language: string;
The language preference of the user.
Example
"en"
locale
locale: string;
The locale or language locale of the user.
Example
"en_US"
organisation
organisation: string;
The organization associated with the user.
phone
phone: string;
The phone number of the user.
role
role: string;
The role or position of the user.
storageLocation
storageLocation: string;
The storage location of the user’s files.
Example
"/path/to/nextcloud/data/frank"
twitter: string;
The user’s Twitter handle.
Example
"Nextcloud"
website
website: string;
The website URL of the user.
Example
"https://nextcloud.com"
default()
default(options): OAuthConfig<NextcloudProfile>
Add Nextcloud login to your page.
Setup
Callback URL
https://example.com/auth/callback/nextcloud
Configuration
import { Auth } from "@auth/core"
import Nextcloud from "@auth/core/providers/nextcloud"
const request = new Request(origin)
const response = await Auth(request, {
providers: [
Nextcloud({ clientId: AUTH_NEXTCLOUD_ID, clientSecret: AUTH_NEXTCLOUD_SECRET, issuer: AUTH_NEXTCLOUD_ISSUER }),
],
})
Resources
- Nextcloud Documentation
- Nextcloud OAuth 2
- Nextcloud Clients and Client APIs
- Nextcloud User provisioning API
Notes
By default, Auth.js assumes that the Nextcloud provider is based on the OAuth 2 specification.
The Nextcloud provider comes with a default configuration. To override the defaults for your use case, check out customizing a built-in OAuth provider.
Disclaimer 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.
Parameters
Parameter | Type |
---|---|
options | OAuthUserConfig <NextcloudProfile > |