Merged
Conversation
baonguyenNava
approved these changes
Mar 15, 2026
Contributor
baonguyenNava
left a comment
There was a problem hiding this comment.
Looks good, as long as UID collisions never happen between different SSO providers. Highly unlikely though.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Implements Story 2: MemberOidcProvisioner Service from the Member SSO Implementation Stories.
This PR adds a provisioner service that creates or updates member users from citizen IdP OIDC claims, following the same pattern as
StaffUserProvisionerbut without role mapping logic.Changes
New Files
app/services/member_oidc_provisioner.rbspec/services/member_oidc_provisioner_spec.rbModified Files
spec/support/sso_helpers.rbImplementation Details
MemberOidcProvisionerBehavior:
uid(not email) to handle email changes correctlyprovider: "member_oidc"if not foundemailandfull_nameon every loginmfa_preference ||= "opt_out"so IdP handles MFA (no app MFA challenge)role(members have no staff role)uid,email) and raisesArgumentErrorif missingStaffUserProvisionerwith deny mode)Key difference from
StaffUserProvisioner:"sso""member_oidc"RoleMapperTest Helpers Added to
sso_helpers.rbmock_member_claims(overrides = {})mock_member_omniauth_hash(overrides = {})setup_member_omniauth_mock(auth_hash = nil)setup_member_omniauth_failure(message)reset_member_omniauthreset_all_omniauthmock_member_oidc_config(overrides = {})Rails.application.config.member_oidcconfigure_member_oidc_for_test(config = nil)Acceptance Criteria
provision!(claims)accepts{ uid:, email:, name: }uid; if not found, creates withprovider: "member_oidc"emailandfull_namefrom claimsroleArgumentErrorif missingTest Coverage
mfa_preferenceset toopt_outPreview environment for reporting-app
♻️ Environment destroyed ♻️