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 Sign in on web in localhost #86

Open
mattwyld-north27 opened this issue Oct 24, 2022 · 5 comments
Open

Apple Sign in on web in localhost #86

mattwyld-north27 opened this issue Oct 24, 2022 · 5 comments

Comments

@mattwyld-north27
Copy link

Describe the bug
I have this working on an iOS device fine but when attempting to use apple log in while developing on http://localhost:8100 it just tells me that i have an "invalid_request - Invalid web redirect url."

What am I doing work?

const options: SignInWithAppleOptions = {
  clientId: 'com.myapp',
  redirectURI: 'http://localhost:8100/login',
  scopes: 'email name',
  // state: '1256',
  state: '12345',
  nonce: hashedNonceHex,
};
const appleUser: SignInWithAppleResponse = await SignInWithApple.authorize(options);`

image

@msoler95
Copy link

msoler95 commented Feb 2, 2023

I worked for me when I changed the clientId for the serviceId. Go to here and create a service. Then add the service identifier to your options.clientId

@alexcroox
Copy link

Apple login doesn’t work with http. Even localhost

@LeCoupa
Copy link

LeCoupa commented Dec 27, 2023

Yes that's what the docs says.

Provide your web domain and return URLs that will support Sign in with Apple. Your website must support TLS 1.2 or higher. All Return URLs must be registered with the https:// protocol included in the URI string. After registering new website URLs, confirm the list you’d like to add to this Services ID and click Done. To complete the process, click Continue, then click Save.

@itsalb3rt
Copy link

I worked for me when I changed the clientId for the serviceId. Go to here and create a service. Then add the service identifier to your options.clientId

Thanks! this definitive need to be inside the main readme in this repository

@ttodua
Copy link

ttodua commented Oct 26, 2024

localhost can't be used at this moment, but for testing purposes one might use e.g. example.com with virtual host to be pointing to 127.0.0.1 in OS settings

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

6 participants