# oauth2\_service

Source: https://zotonic.com/docs/2183/oauth2_service

URI: https://zotonic.com/id/2183

Language: en



Model for OAuth2 service flow helpers, including redirect URL generation and oauth redirect processing.

Available Model API Paths
-------------------------

| Method | Path pattern        | Description                                                                      |
| ------ | ------------------- | -------------------------------------------------------------------------------- |
| `get`  | `/redirect_url/...` | Return the absolute callback URL for `oauth2_service_redirect`, used as redirect URI in remote OAuth/OIDC provider configuration. |
| `post` | `/oauth-redirect`   | Process OAuth/OIDC redirect payload (`state_id`, signed `state_data`, provider `qargs`, session id), validate state/expiry, exchange authorization code for access token, and return login/signup continuation result (`token`, `confirm`, `need_logon`, `need_passcode`, `set_passcode`) or an error. No further lookups. |

`/+name` marks a variable path segment. A trailing `/...` means extra path segments are accepted for further lookups.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2183?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2183?language=en>)
