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

fix(providers): conform Apple #12068

Merged
merged 1 commit into from
Oct 19, 2024
Merged

fix(providers): conform Apple #12068

merged 1 commit into from
Oct 19, 2024

Conversation

balazsorban44
Copy link
Member

@balazsorban44 balazsorban44 commented Oct 19, 2024

☕️ Reasoning

"Sign in with Apple" is not the smoothest thing to implement. The DX for setting things up for development is subpar considering the UX they uphold themselves for their users. It requires extra hops on every corner.

But here it is. With some hacks in the core library - since Apple is unable to follow the OIDC spec -, it is now fully working again. I'm sorry for those who needed to implement hacks for it before.

As part of this work, we've also worked on a way to generate the client secret with a community member, since Apple expects it to be a JWT. You can run npx auth add apple in the root of your project, and it will give you a step-by-step on how to do it. At the end, it will add the AUTH_APPLE_ID and AUTH_APPLE_SECRET to your env file as well.

Feedback on it is appreciated!

Huge thanks to @ChrGrb for the preliminary work in #8428 and #8189.

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

Closes #8189
Closes #6788
Closes #4061
Closes #8188
Closes #9989

📌 Resources

Copy link

vercel bot commented Oct 19, 2024

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

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 19, 2024 7:34pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Oct 19, 2024 7:34pm
proxy ⬜️ Ignored (Inspect) Oct 19, 2024 7:34pm

@github-actions github-actions bot added providers core Refers to `@auth/core` labels Oct 19, 2024
@balazsorban44 balazsorban44 marked this pull request as ready for review October 19, 2024 19:35
@balazsorban44 balazsorban44 merged commit 2810f6b into main Oct 19, 2024
11 checks passed
@balazsorban44 balazsorban44 deleted the fix/apple branch October 19, 2024 19:37
Copy link

codecov bot commented Oct 19, 2024

Codecov Report

Attention: Patch coverage is 8.57143% with 96 lines in your changes missing coverage. Please review.

Project coverage is 39.21%. Comparing base (cce41cf) to head (23c5c97).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
packages/core/src/providers/apple.ts 0.00% 70 Missing ⚠️
...s/core/src/lib/actions/signin/authorization-url.ts 0.00% 11 Missing ⚠️
...es/core/src/lib/actions/callback/oauth/callback.ts 0.00% 9 Missing ⚠️
packages/core/src/providers/oauth.ts 0.00% 4 Missing ⚠️
packages/core/src/lib/utils/providers.ts 81.81% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12068      +/-   ##
==========================================
- Coverage   39.27%   39.21%   -0.06%     
==========================================
  Files         191      191              
  Lines       29852    29920      +68     
  Branches     1288     1297       +9     
==========================================
+ Hits        11725    11734       +9     
- Misses      18127    18186      +59     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@plowden
Copy link

plowden commented Oct 23, 2024

Authjs (next-auth) 5.0.0-beta.25 worked for me for Apple login today, even after upgrading to Next 15.0/React 19.0. Many thanks for your efforts on this.

@Ahmedelwaafy
Copy link

Authjs (next-auth) 5.0.0-beta.25 worked for me for Apple login today, even after upgrading to Next 15.0/React 19.0. Many thanks for your efforts on this.

thanx, your hint was helpful, I upgraded from v5.22 to v5.25 and it worked

@plowden
Copy link

plowden commented Jan 10, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Refers to `@auth/core` providers
Projects
None yet
3 participants