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

Apple/Facebook OAuth #7

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open

Apple/Facebook OAuth #7

wants to merge 27 commits into from

Conversation

robin-turnkey
Copy link

@robin-turnkey robin-turnkey commented Oct 8, 2024

Adding Apple and Facebook OAuth buttons to demo app.

Some notes:

  • The post-authentication step when the redirect is received by the demo app is quite slow. This is because neither Apple nor Facebook supports using an in-app callback to process the provider's response in the flow we need. The result is the user is redirected back to the demo app, which then has to load the iframe (adding another hop to Turnkey). In the case of Facebook, there is yet another hop after the iframe loads since we have to exchange an auth code for an OIDC token with Facebook's API (versus Apple, where it's done in a single round trip).
  • Facebook's flow requires a verification code that is meant to be sent hashed with the initial redirect and then reconfirmed in non-hash form when the auth code is exchanged for a token. Normally, this would be done with some kind of persistent session; for the sake of simplicity I've opted to hash the verification code with a secret salt value, which can then be repeated serverside during the exchange.
  • The Facebook and Apple buttons are custom-built with a logo and text; this is possible because the components we're using for these are either home-grown or provide a custom render prop. The Google component does not provide this option, hence the design being slightly incongruent between the Google button and the others. @taylorjdawson is taking this on as a followup task, as it is a slightly larger lift.

Copy link

vercel bot commented Oct 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
demo-embedded-wallet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2024 11:15pm

@robin-turnkey robin-turnkey changed the title Apple oauth button Apple/Facebook OAuth Oct 17, 2024
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] Transitive: environment +4 219 kB patelmayankce
npm/[email protected] None 0 239 kB keppelen

View full report↗︎

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

Successfully merging this pull request may close these issues.

2 participants