Skip to content

Commit 8c94100

Browse files
authored
Merge pull request #669 from devforth/feature/AdminForth/1724/add-param-like-loginstart_oa-t
fix: update documentation for OAuth plugin
2 parents 4c7d2d7 + 5ddb08f commit 8c94100

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
@@ -535,6 +535,21 @@ Links to adapters:
535535
[Keycloak](https://github.com/devforth/adminforth-oauth-adapter-keycloak)
536536

537537

538+
## Starting OAuth flow from an external page
539+
540+
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:
541+
542+
```
543+
https://your-admin.example.com/login?start_oauth=google
544+
https://your-admin.example.com/login?start_oauth=clerk
545+
```
546+
547+
The value must match the provider name (case-insensitive). AdminForth will immediately redirect the user to the OAuth provider, skipping the login page entirely.
548+
549+
The provider name is derived from the adapter class name — for example `AdminForthAdapterOauth2Google``google`, `AdminForthAdapterOauth2Clerk``clerk`.
550+
551+
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.
552+
538553
## Fill user full name
539554

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

0 commit comments

Comments
 (0)