Revoke not working with Microsoft Azure B2C ID servers.
However I think there is a problem in general with the current implementation:
When doing revoke() it just sends the request in the app's background, but does not actually open Browser and make a request there.
Because of that, even if I logout in my mobile app and forget the token. The next time I do authorize() it just opens Browser and automatically logins (because the session is being cached there)
To mitigate this problem I have to something like that:
config.serviceConfiguration.authorizationEndpoint = config.serviceConfiguration.revocationEndpoint
const result = await this.appAuth.authorize(config);
This works, however it also crashes my application on callback...
TLDR: When doing revoke please open actual Browser window and make a request there. Not just send revoke in the background
Hi @blacktea - fair observation. As this library is simply a wrapper around the native iOS and Android libraries, we try to mostly limit ourselves to what the native libraries have already implemented.
Here are relevant issues in both:
https://github.com/openid/AppAuth-iOS/issues/47
https://github.com/openid/AppAuth-Android/issues/50
The general consensus is that logout is not part of the spec at the moment (though there is a proposal) and hence is not part of the library which adheres strictly to implementing the spec.
The reason this logout function exists at all is that we initially implemented the functionality that we ourselves needed.
This is not the first time that this single sign-out is suggested however, so I think it might be something to consider, depending on the interest.
I'm closing this issue in favour of https://github.com/FormidableLabs/react-native-app-auth/issues/68 which was raised before this one, but leaving the other open as a possible future enhancement.
@kadikraman great thanks, I'm forking this lib. Will bend it to my will! }-:-D
Hey @blacktea, did you have any success integrating Azure B2C with your react native app?
I'm stuck with a failure in exchanging the code for a token.
Specifically, I'm getting this error:
AADSTS70000: Transmission data parser failure: Authorization Code is malformed or invalid.
Trace ID: 87b5e070-695d-4ef1-a585-506ad4610300
Correlation ID: bc208484-a342-41e3-a463-e9606a8710a7
Timestamp: 2018-07-20 03:21:03Z
@finalgriever - yes it works for us
Just as a follow up to this, I managed to get Azure B2C working by specifying the serviceConfiguration, and explicitly providing the token and authorization endpoints.
One mistake I was making, was providing the p (policy) parameter in the "extra parameters" argument.
Once I removed it from the extra parameters, and just incorporated it as a get parameter in the token/authorization endpoints, everything worked.
@finalgriever thanks for providing your solution! 馃挴
Most helpful comment
Just as a follow up to this, I managed to get Azure B2C working by specifying the serviceConfiguration, and explicitly providing the token and authorization endpoints.
One mistake I was making, was providing the
p(policy) parameter in the "extra parameters" argument.Once I removed it from the extra parameters, and just incorporated it as a get parameter in the token/authorization endpoints, everything worked.