-
Notifications
You must be signed in to change notification settings - Fork 24
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
Not able to map SSN during first login #58
Comments
Thanks for the report. However also note that if/when you use only username/password to authenticate the SSN will not be present since it is taken from the login session we do with BankID. As such if you permit a user to choose to use username/password instead of BankID to login then it is expected behavior that the SSN is not present in the session notes. |
Closes: #58 Co-authored-by: mikaelkaron <[email protected]>
@mikaelkaron I think I managed to reproduce and fix the issue. Can you please build the PR #59 branch and check if this solves your issue ? |
Closes: #58 Co-authored-by: mikaelkaron <[email protected]>
Closes: #58 Co-authored-by: mikaelkaron <[email protected]>
I see it's in master. I'll pull/build and report back. |
Thanks, you can also find precompile jar here https://github.com/sweid4keycloak/bankid4keycloak/packages/1828253 |
Did a local test but still able to reproduce. Did I mess it up? I built from |
Yeah my changes should be in master. |
Ok, now I'm sure I've tested with your version as I'm using the pre-built package:
|
let's see if you're doing it the same way as I am.
When doing this I get this {
"exp": 1726778016,
"iat": 1726777716,
"auth_time": 1726777715,
"jti": "6a1c4ee7-73de-4d81-af51-8540f472c5be",
"iss": "https://keycloak.local/realms/elivery-b2c",
"aud": "account",
"sub": "3f585c40-68c1-4386-ae2f-ce1f4195a796",
"typ": "Bearer",
"azp": "elivery-auth",
"sid": "02dd331c-b0eb-4683-b4e0-700838b06845",
"acr": "1",
"allowed-origins": [
"*"
],
"resource_access": {
"account": {
"roles": [
"manage-account",
"manage-account-links",
"view-profile"
]
}
},
"scope": "openid profile email",
"email_verified": true,
"roles": [
"offline_access",
"uma_authorization",
"user",
"default-roles-elivery-b2c"
],
"name": "Mikael Karon",
"preferred_username": "mikael",
"given_name": "Mikael",
"family_name": "Karon",
"email": "[email protected]"
} When you decode that you can see there's no SSN So I log out/in and now this is my {
"exp": 1726778221,
"iat": 1726777921,
"auth_time": 1726777921,
"jti": "ee146cec-de28-4f7e-b823-cf13485f6ba3",
"iss": "https://keycloak.local/realms/elivery-b2c",
"aud": "account",
"sub": "3f585c40-68c1-4386-ae2f-ce1f4195a796",
"typ": "Bearer",
"azp": "elivery-auth",
"sid": "c339587e-b5a0-4826-9d16-af8fb8e5a8de",
"acr": "1",
"allowed-origins": [
"*"
],
"resource_access": {
"account": {
"roles": [
"manage-account",
"manage-account-links",
"view-profile"
]
}
},
"scope": "openid profile email",
"email_verified": true,
"roles": [
"offline_access",
"uma_authorization",
"user",
"default-roles-elivery-b2c"
],
"name": "Mikael Karon",
"preferred_username": "mikael",
"given_name": "Mikael",
"family_name": "Karon",
"email": "[email protected]",
"ssn": "197900000000"
} |
I hope it helps with the screenshots. I don't know all the possible flows you can take when linking an account so I figured it could help with some clarification. |
Yes thanks, this is slightly different than the use case I tested. I guess the second login, using password, that you perform will most likely clear the user session notes and this is why the information does not persist. |
Describe the bug
Following the instructions in #57 I managed to get the user SSN mapped into the
access_token
, but not until the second login.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The second time I log in I have the SSN mapped an everything works. I'd expect this to work the first time as well
Environment:
master
]Additional context
Could it be related to this redit thread?
The text was updated successfully, but these errors were encountered: