TeskaLabs / seacat-auth

SeaCat Auth provides authentication, authorization, identity management, session management and other access control features.
GNU General Public License v3.0
11 stars 6 forks source link

Customizable redirect after successful external login #316

Open byewokko opened 11 months ago

byewokko commented 11 months ago

Current behavior

Successful login via external identity provider redirects the user to "My account" page of Seacat Auth UI, whicxh is sort of a dead end for the user. See https://github.com/TeskaLabs/seacat-auth/blob/d2b756196b1b339796e227ad5fa944df57ed6577/seacatauth/external_login/handler.py#L147

Expected behavior

Successful login via external identity provider redirects the user to whatever the original requested URL was. If this fails, there should be a configurable fallback URL.

This must also extend to registering a new external login for an existing user.

Proposed implementation

Option 1: Adding state to the existing flow

The flow for registering new external login provider for an already logged-in user should be analogous, but i'm not sure how to store the state in this case yet.

PROs:

CONs:

Option 2: Authorization flow with OpenID ACR values

Reference:

PROs:

CONs: