React-native-app-auth: sign out

Created on 6 Sep 2018  Â·  11Comments  Â·  Source: FormidableLabs/react-native-app-auth

Hello

is it posible to sign out with using this module?

I've seen this issue https://github.com/FormidableLabs/react-native-app-auth/issues/68

It is not "enhancement" or "nice to have" its a bug for library

we can see here how it should looks https://github.com/react-native-community/react-native-google-signin#signout

for example OIDC client https://github.com/IdentityModel/oidc-client-js for JS have this functionality too

How we can SignOut with react-native-app-auth ?

Most helpful comment

Yeah there's quite a few people fighting the issue. Radio silence from Apple though.

As a workaround, if you add

additionalParameters: {
  prompt: 'login'
}

to your config, it will always prompt the user to log in.

SFAuthenticationSession does not persist the cookies past the current session btw, if you close the app completely and reopen it, they'll be gone, so this is only an issue if in the _same_ session you've already logged in once so hopefully the above workaround is sufficient.

All 11 comments

@djleonskennedy we have a revoke method which calls the token revocation endpoint.

@kadikraman Thank you for answer, is it possible that problem course IS4 configuration on BE ?

What is BE?

The IS4 implementation requires you to send the clientId in the revocation request so the config for it is:

await revoke(config, {
  tokenToRevoke: refreshedState.refreshToken,
  sendClientId: true
});

This is a network request only. It doesn't open a webview. The issue you linked to was a suggestion that it should. That's on in the OAuth spec though, hence nice to have.

@kadikraman BE (Back End)

as i can see now re-woke is working fine, it's resolves with status 200, however then during sign in webview login with previous credentials, looks like it use cookies or some thing like that, is it possible to reset webview data to avoid auto login? (solutions like 'react-native-cookies' doesn't affect)

Yeah there's quite a few people fighting the issue. Radio silence from Apple though.

As a workaround, if you add

additionalParameters: {
  prompt: 'login'
}

to your config, it will always prompt the user to log in.

SFAuthenticationSession does not persist the cookies past the current session btw, if you close the app completely and reopen it, they'll be gone, so this is only an issue if in the _same_ session you've already logged in once so hopefully the above workaround is sufficient.

@kadikraman that helps, thanks a lot

@kadikraman is there a way to clear the auth's in-app-browser's cookies on Android? It doesn't look like https://github.com/joeferraro/react-native-cookies affects it.

Hi @spsaucier - I've been looking through the issues in AppAuth Android for this, and they also say to just use the prompt=login in the auth request, referring to the openid docs

Thanks @kadikraman, we're already doing that, but for this Okta setup, it still shows only the password field.

@spsaucier I'm experiencing a similar issue. Any luck finding a solution?

Unfortunately, no, I haven't found one.

On Sun, Jan 12, 2020, 7:59 PM snicro notifications@github.com wrote:

@spsaucier https://github.com/spsaucier I'm experiencing a similar
issue. Any luck finding a solution?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/FormidableLabs/react-native-app-auth/issues/171?email_source=notifications&email_token=AAERRL6OTOFHX5FXE6RO563Q5O4GVA5CNFSM4FTSD6MKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIXJPKI#issuecomment-573478825,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAERRL5J6L3WN75VM6RALE3Q5O4GVANCNFSM4FTSD6MA
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timeinvestgroup picture timeinvestgroup  Â·  8Comments

lequangnguyenqn picture lequangnguyenqn  Â·  5Comments

erichulser picture erichulser  Â·  5Comments

titoff002 picture titoff002  Â·  7Comments

Electrofenster picture Electrofenster  Â·  4Comments