Configure login identifiers and OAuth options.
createConfig({
login: {
identifiers: ['email'], // or ['email', 'username']
allowGoogleOAuth: false,
},
});| Option | Type | Default | Description |
|---|---|---|---|
identifiers |
string[] | ['email'] |
Fields users can log in with |
allowGoogleOAuth |
boolean | false |
Enable Google OAuth 2.0 login |
['email']— Login with email only (default)['email', 'username']— Login with email or username (requiresusernamefield enabled)
When allowGoogleOAuth: true, two additional routes are mounted:
GET /auth/google— Redirect to GoogleGET /auth/google/callback— Handle Google's redirect
See Google OAuth Configuration for credential setup.