Associate external provider to logged user #118
Labels
enhancement
Improvements in term of performance or behaviour
feature
New feature to be developed
ui
Something related to the UI operations or display
Milestone
Using the
authomatic
login procedure with external identity providers (github, wso2, dkrz, ...), instead of creating a new internal user, connect the external user to an already logged in user.This allows an internal user to login with any of is associated accounts (similar to most sites using 'connect with Google/Facebook/etc.'), and combine all user permissions of a "same person" under a common internal user identity (no duplication required across each sub-user for each external provider).
ExternalIdentity
already resolves properly to the internal user when logging in with an external identity if the associated dbexternal_identities.local_user_id
points to a valid internal user. Only the method to set this field needs to be implemented.TODO
Will require a new API route
POST /providers/{providerId}/add
to launch theGET /providers/{providerId}/signin
procedure. On valid external login, it should create the external identity and associate it to the current user.API HTTPNotAuthorized on calling the new route if not logged in (with internal user).
[using default magpie view permission should do it]
API HTTPNotAuthorized on external login failure.
API HTTPCreated on successful external identity creation and association to local user.
Ensure that previous operations still work. If login is done with either:
POST /signin {"provider_name": "<providerID>"}
GET /providers/{providerId}/signin
without being logged in (internal user)
Will require a new UI button to associate the new external provider, ideas:
POST /providers/{providerId}/add
?Require
DELETE /providers/{providerId}
to dissociate an account connection, removing theExternalIdentity
that was created for it (does not remove theUser
associated to it).Add a UI button for running the dissociate operation.
Extra
username
(on the external provider), which can rapidly lead to conflicts locally. An input field should be made available for the localusername
to employ, regardless of the value used as external identity.The text was updated successfully, but these errors were encountered: