Skip to content
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

Add support for Facebook auth JWT token #9117

Closed
mtrezza opened this issue May 6, 2024 · 11 comments · Fixed by #9122
Closed

Add support for Facebook auth JWT token #9117

mtrezza opened this issue May 6, 2024 · 11 comments · Fixed by #9122
Labels
bounty:$100 Bounty applies for fixing this issue (Parse Bounty Program) state:released Released as stable version state:released-6.x.x state:released-alpha Released as alpha version state:released-beta Released as beta version type:feature New feature or improvement of existing feature

Comments

@mtrezza
Copy link
Member

mtrezza commented May 6, 2024

New Feature / Enhancement Checklist

Current Limitation

Due to Apple's ATT requirements, the "normal" Facebook Login requires a user to allow app tracking. For users who do not allow app tracking, Facebook Limited Login must be used instead, which uses JWT for authentication. Parse Server currently only supports the token provided by "normal" Facebook Login. It does not support the token generated by Limited Login.

This is an urgent issue, because:

  • The majority of users does not allow app tracking, so developers must often fall back to Limited Login.
  • The Facebook SDKs <= 16 are rejected by AppStore review because they lack the privacy manifest file. The Facebook SDK 17 automatically prohibits "normal" Login and requires Limited Login if the user has not allowed app tracking.

That means that Parse Server (and possibly the Parse Apple SDK) currently do not support Facebook auth when submitting a new app or an app update to the AppStore with Facebook SDK 17.

See parse-community/Parse-SDK-iOS-OSX#1787

Feature / Enhancement Description

Extend the Facebook auth adapter, so that it supports JWT auth from Facebook Limited Login. Ideally, no change will be required on the Parse Apple SDK side.

Alternatives / Workarounds

Unknown.

3rd Party References

Copy link

parse-github-assistant bot commented May 6, 2024

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!

@mtrezza mtrezza added type:feature New feature or improvement of existing feature bounty:$100 Bounty applies for fixing this issue (Parse Bounty Program) labels May 6, 2024
@mtrezza
Copy link
Member Author

mtrezza commented May 6, 2024

Note: The bounty scope includes parse-community/Parse-SDK-iOS-OSX#1787.

@mtrezza
Copy link
Member Author

mtrezza commented May 15, 2024

For reference, here the PR that implemented FB limited login server side: #7219. It defined:

Classic Graph API login (no change)

{
  id: "your_facebook_id",
  access_token: "facebook_graph_api_access_token"
}

Limited Login

{
  id: "your_facebook_id",
  token: "openid_token"
}

@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 6.5.6

@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.1.0-alpha.7

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label May 16, 2024
@mtrezza mtrezza unpinned this issue May 16, 2024
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.1.0-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Jun 30, 2024
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.1.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Jun 30, 2024
@thphuccoder
Copy link

For some reason, I can only use below structure for both Limited and Classic:
(Parse server 7.2.0)

{
  id: "your_facebook_id",
  token: "openid_token"
}

If I replace token by access_token in classic mode, it says:

Status Code: 101
Type: ObjectNotFound
Error: Facebook auth is invalid for this user.

@mtrezza
Copy link
Member Author

mtrezza commented Sep 2, 2024

@pdkcoder Does it work for both classic and limited login?

@thphuccoder
Copy link

Hi @mtrezza Yes it works for both

@mtrezza
Copy link
Member Author

mtrezza commented Sep 10, 2024

@pdkcoder Could you open a new issue and describe the issue in more detail with sample code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty:$100 Bounty applies for fixing this issue (Parse Bounty Program) state:released Released as stable version state:released-6.x.x state:released-alpha Released as alpha version state:released-beta Released as beta version type:feature New feature or improvement of existing feature
Projects
None yet
3 participants