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

Improve Flash Message Within openid_connect When auth.info.email is nil #966

Open
aaronskiba opened this issue Dec 11, 2024 · 6 comments
Open
Assignees

Comments

@aaronskiba
Copy link
Collaborator

Please complete the following fields as applicable:

What version of the DMPRoadmap code are you running? (e.g. v2.2.0)

  • 4.1.1+portage-4.2.3

Current behaviour:
When CILogon is unable to return the auth.info.email attribute, the flash message 'Something went wrong, Please try signing up here.' is rendered (relevant code below):

def openid_connect
  # First or create
  auth = request.env['omniauth.auth']
  user = User.from_omniauth(auth)  

  if auth.info.email.nil? && user.nil?
    flash[:notice] = _('Something went wrong, Please try signing up here.')
    redirect_to new_user_registration_path
    return
  end

Desired behaviour:

  • It would be better to provide the user with instructions with how to enable CILogon to return auth.info.email. For example, they could be told to navigate to https://cilogon.org/testidp/ and verify that their chosen IdP is providing all required attributes to CILogon.
@aaronskiba
Copy link
Collaborator Author

Hi @closenma, here is an idea for what the updated flash message could display:

"Unable to sign in with the selected identity provider. Please visit https://cilogon.org/testidp/ to verify that all required fields are provided, or try signing in with another identity provider."

@closenma
Copy link
Collaborator

This looks good to me, I'll submit it for translation

@closenma
Copy link
Collaborator

The French translation for the string has been returned by Alliance Translation
Vous n’avez pas pu vous connecter en utilisant le fournisseur d’identité sélectionné? Veuillez consulter le site https://cilogon.org/testidp/ pour vérifier que tous les champs requis sont renseignés, ou essayez un autre fournisseur d’identité pour vous connecter.

@aaronskiba
Copy link
Collaborator Author

aaronskiba commented Jan 21, 2025

Hi @closenma,

I'm now realising that in addition to when signing in, this issue can also be encountered by already signed in users attempting to link on the edit profile page. Given that, maybe we need a second string + translation for that case?

If so, here is a suggested addition:

"Unable to link with the selected identity provider. Please visit https://cilogon.org/testidp/ to verify that all required fields are provided, or try linking with another identity provider."

@closenma
Copy link
Collaborator

I'll send this one in for translation right away

@closenma
Copy link
Collaborator

Translation has returned:
Vous ne parvenez pas à vous connecter via le fournisseur d'identité sélectionné? Veuillez cliquer sur https://cilogon.org/testidp/ pour vérifier que tous les champs requis sont remplis, ou alors vous pouvez essayer de vous connecter à l'aide d'un autre fournisseur d'identité.

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

No branches or pull requests

2 participants