Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working autoaffiliate POC for FC and existing users #22

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TTalex
Copy link
Member

@TTalex TTalex commented Sep 20, 2024

This is a proof of concept of using a magic link to automatically affiliate users to their employer.

The magic link is a regular auth link, with a specific query parameter passed to the redirect page, e.g:

/auth/realms/mcm/protocol/openid-connect/auth?client_id=platform&response_mode=fragment&response_type=code&login=true&redirect_uri=http://localhost:8000/redirection/?autoaffiliate=2219e721-ac71-4a65-a202-37675c74ba58

The new param autoaffiliate contains the entrepriseID that will be linked to the user.

When present on redirect, the user is automatically affiliated, without the need to specify a work email or manual validation. The user is also redirected to its employer incentives page.

Note: this only works for existing account, or accounts created with FranceConnect. Creating a new account using the moB form breaks the context, and we lose track of the autoaffiliate param.

Demo:
Peek 2024-09-20 18-09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant