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

Feature: Apple sign in for web. #2298

Open
gedw99 opened this issue Oct 29, 2023 · 8 comments
Open

Feature: Apple sign in for web. #2298

gedw99 opened this issue Oct 29, 2023 · 8 comments

Comments

@gedw99
Copy link

gedw99 commented Oct 29, 2023

Apple sign is how apple users can sign in and also use passkey.

https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_rest_api/authenticating_users_with_sign_in_with_apple

Expected Behavior

Shows the apple sign in icon in the sample web page.

Implements the required backend calls etc.

desktop and mobile apps is out of scope. Let’s just get web based sign in working for now.

Current Behavior

It’s a new feature…

Possible Solution

There is sample golang code here :

https://github.com/Timothylock/go-signin-with-apple

Apparently is a lot like oidc and oAuth .

Steps to Reproduce (for bugs)

N/A

Context

It would be good if the backend and a sample html page is done so it’s easy to see how to use it.

there is a js file that Apple provide so maybe use that as a script for the html example.

here is Apples html example:

https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/configuring_your_webpage_for_sign_in_with_apple

Your Environment

Golang backend.

For frontend and apple credentials setup all are explained in this Flutter plugin:

https://pub.dev/packages/sign_in_with_apple

I intend to use the web frontend with a htmx and golang setup , and for desktop and mobile to use a webview.

Here is sample code of using htmx with golang to do auth :

https://github.com/Darkness4/auth-htmx

@gedw99 gedw99 changed the title Apple sign in for web. Feature: Apple sign in for web. Oct 29, 2023
@gedw99 gedw99 mentioned this issue Oct 29, 2023
@braunsonm
Copy link
Collaborator

What difference does Apple OIDC have that isn't compatible with the existing OIDC provider support?

@tuunit
Copy link
Member

tuunit commented Oct 29, 2023

Open letter from the OpenID Foundation to Apple: https://openid.net/open-letter-from-the-openid-foundation-to-apple-regarding-sign-in-with-apple/

I haven't checked what the current state is. Maybe some of it has been changed / fixed. I didn't have the time for a deep dive yet.

Differences:
https://bitbucket.org/openid/connect/src/master/How-Sign-in-with-Apple-differs-from-OpenID-Connect.md

Peculiarities

  • No UserInfo endpoint is provided, which means claims about users are instead included in the (expiring and potentially large) id_token.
  • The scope value of only the very first request by an application is respected. If an application initially requests only the name scope, and the user allows it, it is then impossible to later also request the email scope.
  • The client_secret_basic client authentication method is not supported, despite being mandatory to implement for OpenID Certified implementations.
  • Authentication at the token endpoint requires a (custom) JWT assertion as a client_secret in a client_secret_post authentication method, whereas the more appropriate private_key_jwt authentication method, as defined in RFC 7523, could have been used.
  • The Authorization Code grant type (for public Clients) does not use PKCE [RFC 7636] to avoid code injection and code replay attacks.
  • Including the profile scope in the request causes the error invalid_request "Application is not authorized to access the requested information". Instead, the non-standard scope name is used to request the user's name.
  • The user's name is only sent to the application in the POST request to the redirect URI (along with the authorization code) and so is susceptible to injection attacks. The UserInfo Endpoint response is the correct place to return this claim about the end-user.

Copy link
Contributor

This issue has been inactive for 60 days. If the issue is still relevant please comment to re-activate the issue. If no action is taken within 7 days, the issue will be marked closed.

@github-actions github-actions bot added the Stale label Dec 31, 2023
@tuunit
Copy link
Member

tuunit commented Dec 31, 2023

@kvanzuijlen are you going to work on this? :)

@tuunit tuunit added needs tests and removed Stale labels Dec 31, 2023
@kvanzuijlen
Copy link
Member

kvanzuijlen commented Dec 31, 2023

I have some code ready for this but still need to get access to Apple credentials. I think I should be able to work on this over the next few weeks.

Copy link
Contributor

github-actions bot commented Mar 1, 2024

This issue has been inactive for 60 days. If the issue is still relevant please comment to re-activate the issue. If no action is taken within 7 days, the issue will be marked closed.

@github-actions github-actions bot added the Stale label Mar 1, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 10, 2024
@denniseffing
Copy link

Are there any plans to re-open this issue? Would be awesome to have this.

@tuunit
Copy link
Member

tuunit commented Nov 10, 2024

@denniseffing it seems no one had the time to create a PR for this feature. If you are willing to invest the time. Feel free to go ahead and open a PR.

@tuunit tuunit reopened this Nov 10, 2024
@tuunit tuunit removed the Stale label Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants