Closed daviddelannoy closed 1 year ago
Hi @daviddelannoy π
It's great to see you digging into this one!
This bug indeed should be fixed. Thx for submitting a PR. I'll give it a test and closer look.
You're welcome π
Thanks for maintaining this provider! π
Hi,
Version used : 1.2.0 (with KC 19.0.3, wildfly legacy)
When a user refuses Apple Consent screen (to share its email) by clicking the cancel button :
Then we got this NPE :
I think that this functional case should be handled like ACCESS_DENIED. But in both callback.cancelled() or callback.error() authenticationSession is required in checkAccountManagementFailedLinking method.
Before submitting a PR, what do you think about fetching authenticationSession here before this line :
https://github.com/klausbetz/apple-identity-provider-keycloak/blob/09a2721e425bcfe54eba298cb2925c857608fd1c/src/main/java/at/klausbetz/provider/AppleIdentityProviderEndpoint.java#L65
just like it is done in AbstractOAuth2IdentityProvider#authResponse() ?
It fixes the issue. I think this code can be removed too
What do you think @klausbetz ?