Skip to content

Facebook invalid access token in production build #619

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

Open
GergelyNemes opened this issue Mar 20, 2025 · 4 comments
Open

Facebook invalid access token in production build #619

GergelyNemes opened this issue Mar 20, 2025 · 4 comments

Comments

@GergelyNemes
Copy link

Hi.

I have a problem with facebook login on IOS when i build to production. The login is working fine when i'm building the app with "ns debug ios" to test it on my phone but when the app is built to production i get an access token from facebook witch is invalid. When i put the token into facebook Access token debugger it's says "Invalid OAuth access token - Cannot parse access token". Does anybody run into the same issue?

Image

@PsHye
Copy link

PsHye commented Apr 9, 2025

Same happens to me, it seems that that the tokenString property is returning a nonvalid, the plugin should return something like "EEAGtoken" but its seems it's different and invalid for graph.facebook to work
Tested in iOS at v3.0.0

Edited: April 10, 2025:
I went back to the v2.2.0 and its working now, so the problem is in the current version

@GergelyNemes
Copy link
Author

I find a solution. You have to enable tracking for your application before you try to use facebook login.

@felixkrautschuk
Copy link
Contributor

@GergelyNemes but if you show the ATT dialog and the user refuses tracking, the access token is still invalid :(

@felixkrautschuk
Copy link
Contributor

I made a PR, where the authenticationToken is added to the LoginResult.
#624
In case the user opts out of ATT, the authenticationToken must be sent to backend instead of the invalid access token, but it is missing in the current plugin version 3.0.0.

https://developers.facebook.com/docs/facebook-login/limited-login/ios

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

No branches or pull requests

3 participants