providers/a12n-server
A12nServerProfile
Extends
Record
<keyofCommonProviderOptions
,string
>
Properties
id
id: string;
Overrides
Record.id
name
name: string;
Overrides
Record.name
token_type?
optional token_type: "refresh_token" | "bearer";
type
type: "oidc";
Overrides
Record.type
A12nServerUserProfile
Add a12n-server login to your page.
Setup
In .env
create the following entries:
https://github.com/curveball/next-a12n?tab=readme-ov-file#environment-variables
AUTH_A12N_ISSUER=
AUTH_A12N_ID=
AUTH_A12N_SECRET=
Callback URL
https://your-site-or-backend.com/api/auth/callback/a12n-server
Configuration
import { Auth } from "@auth/core"
import a12n from "@auth/core/providers/a12n-server"
const request = new Request(origin)
const response = await Auth(request, {
providers: [
a12n({
clientId: process.env.AUTH_A12N_ID,
clientSecret: process.env.AUTH_A12N_SECRET
}),
]
})
Resources
- a12n-server Overview Set up a12n-server
- How to add a new client to a12n-server
- How to retrieve the user’s information from your a12n-server
- Learn more about OAuth
Notes
Grant type: Authorization Code
By default, Auth.js assumes that the a12n-server Oauth2 provider is based on the OAuth 2 specification.
:::tip
Help
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.
Extends
Indexable
[key
: string
]: unknown
[key
: number
]: unknown
Properties
address?
optional address: string;
birthdate?
optional birthdate: string;
email?
optional email: string;
email_verified?
optional email_verified: boolean;
family_name?
optional family_name: string;
given_name?
optional given_name: string;
locale?
optional locale: string;
name
name: string;
phone_number?
optional phone_number: string;
phone_number_verified?
optional phone_number_verified: boolean;
picture?
optional picture: string;
preferred_username?
optional preferred_username: string;
sub
sub: string;
updated_at
updated_at: number;
website?
optional website: string;
zoneinfo?
optional zoneinfo: string;
default()
function default(config): OIDCUserConfig<A12nServerUserProfile>
Parameters
Parameter | Type |
---|---|
config | OIDCConfig <A12nServerProfile > |