Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.

Fix hasAccessToken check #853

Merged
merged 1 commit into from
Mar 13, 2020
Merged

Fix hasAccessToken check #853

merged 1 commit into from
Mar 13, 2020

Conversation

blackwolf12333
Copy link

When an access token is expired this plugin would not
fetch a new one. This is invalid behaviour and resulted
in failed login attempts because the token was expired,
but still passed to the javascript code as a valid token.

This patch adds a check if the token is expired as well.

When an access token is expired this plugin would not
fetch a new one. This is invalid behaviour and resulted
in failed login attempts because the token was expired,
but still passed to the javascript code as a valid token.

This patch adds a check if the token is expired as well.
@peterpeterparker
Copy link
Collaborator

Thx for the PR 👍

It makes sense specially for login!

Could you also improve the iOS code? If I'm not wrong, expired isn't check there too.

@blackwolf12333
Copy link
Author

I'll have a look friday, didn't experience any issues there though.

@peterpeterparker
Copy link
Collaborator

Cool, keep me posted!

@blackwolf12333
Copy link
Author

As far as I can see the iOS sdk does allow the current access token to be null, also the plugin code calls FBSDKAccessToken refreshCurrentAccessToken before attempting to login. So I think the token will never be expired?

@peterpeterparker peterpeterparker merged commit a5edc20 into jeduan:master Mar 13, 2020
@peterpeterparker
Copy link
Collaborator

That works for me. Merged and release (v6.4.0).

Thx for the PR @blackwolf12333

@blackwolf12333 blackwolf12333 deleted the fix_android_token_expired_check branch March 14, 2020 13:04
@nuno
Copy link

nuno commented Jun 2, 2020

on iOS for some reason if I have the FB native app installed I can't login anymore. I tested on simulator and works just fine, means that open the web modal login.

But if the Native modal login open with text :
You already initialized a session on facebook, you want continue?

Wondering if I have something wrong.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants