/api/collections/{collection.name}/auth-with-oauth2
Authenticate with an OAuth2 provider and returns a new auth token and record data.
For more details please check the OAuth2 integration documentation .
/api/collections/{collection.name}/auth-with-oauth2
Param | Type | Description |
---|---|---|
Required
provider
|
String | The name of the OAuth2 client provider (eg. "google"). |
Required
code
|
String | The authorization code returned from the initial request. |
Required
codeVerifier
|
String | The code verifier sent with the initial request as part of the code_challenge. |
Required
redirectURL
|
String | The redirect url sent with the initial request. |
Optional
createData
|
Object |
Optional data that will be used when creating the auth record on OAuth2 sign-up.
The created auth record must comply with the same requirements and validations in the
regular create action.
|
Param | Type | Description |
---|---|---|
expand | String |
Auto expand record relations. Ex.:
The expanded relations will be appended to the record under the expand property (eg. {`"expand": {"relField1": {...}, ...}`} ).
Only the relations to which the request user has permissions to view will be expanded. |