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

Catch error and provide message #13115

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

Conversation

dacook
Copy link
Member

@dacook dacook commented Feb 3, 2025

What? Why?

What should we test?

  • Visit ... page.

Release notes

Changelog Category (reviewers may add a label for the release notes):

  • User facing changes
  • API changes (V0, V1, DFC or Webhook)
  • Technical changes only
  • Feature toggled

The title of the pull request will be included in the release notes.

Dependencies

Documentation updates

@dacook dacook requested a review from mkllnk February 3, 2025 02:34
@dacook
Copy link
Member Author

dacook commented Feb 3, 2025

@mkllnk , can you please review the error above, and let me know if I'm on the right track?

If so, I'll go ahead and add a spec (I think a spec request would be sufficient)

Comment on lines +8 to 11
rescue ActiveRecord::RecordNotUnique
flash[:error] = t("devise.oidc.record_not_unique", uid: request.env["omniauth.auth"].uid)
redirect_to admin_oidc_settings_path
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks right.

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

Successfully merging this pull request may close these issues.

ActiveRecord::RecordNotUnique in omniauth_callbacks#openid_connect
2 participants