Skip to content

Commit 5ddb08f

Browse files
committed
fix: update documentation for OAuth plugin
1 parent a7293a8 commit 5ddb08f

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

  • adminforth/documentation/docs/tutorial/09-Plugins

adminforth/documentation/docs/tutorial/09-Plugins/11-oauth.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,21 @@ Links to adapters:
492492
[Keycloak](https://github.com/devforth/adminforth-oauth-adapter-keycloak)
493493

494494

495+
## Starting OAuth flow from an external page
496+
497+
If you have an external website with a "Sign in" button that should open the AdminForth OAuth flow directly — without showing the login form first — use the `start_oauth` query parameter:
498+
499+
```
500+
https://your-admin.example.com/login?start_oauth=google
501+
https://your-admin.example.com/login?start_oauth=clerk
502+
```
503+
504+
The value must match the provider name (case-insensitive). AdminForth will immediately redirect the user to the OAuth provider, skipping the login page entirely.
505+
506+
The provider name is derived from the adapter class name — for example `AdminForthAdapterOauth2Google``google`, `AdminForthAdapterOauth2Clerk``clerk`.
507+
508+
If the specified provider is not found, an error toast is shown on the login page. If `start_oauth` is provided without a value (`?start_oauth`), nothing happens and the regular login form is displayed.
509+
495510
## Fill user full name
496511

497512
If you have a fullName field in your users resource, you can add it to the plugin setup:

0 commit comments

Comments
 (0)