Sign in with Apple JS

RSS for tag

Provide users with a fast, secure way to sign into your web service with their Apple ID using Sign in with Apple JS.

Posts under Sign in with Apple JS tag

127 Posts

Post

Replies

Boosts

Views

Activity

Apple sign-in troubles with use case
Hello, I'm currently struggling to figure out how I can make Apple sign in work with my app configuration. Maybe I'm just dumb, but I really can't figure out what I need to do to make it work. So I have a Next.js app setup server-side rendering my React frontend, and on a separate server, I have a Node.js (specifically Adonis.js) backend/api which I use to handle auth and sessions. I have both Facebook and Google OAuth2 logins setup and working perfectly, where I'm receiving a code as a query param in my callback url to my frontend, which the client then sends that code to my backend/api, which uses that code with the provider (FB or Google) to get their email, name, and any other data I could use to prevent the user from having to add later, and either create the user and log them in, or just log them in if they already exist using cookies. I don't need any sort of write access to their third party account, or anything more than reading their name and email so they don't have to enter it themselves, and so they don't have to enter a password on my site. There are 2 different questions I have. (and if there is a solution to the first one, it would make my life so much easier ha..) If I use these query params similar to how I would with Google or Facebook: response_type: 'code', client_id: Env.get('APPLE_APP_ID'), redirect_uri: 'https://example.com/auth/apple/callback' state: '', scope: '', response_mode: 'query' And I get redirected back to my frontend with the code in the url params, and I send it to my API like I do with Facebook/Google, is there any endpoint with Apple's system that I can use that code to request the user's email and name from? 2. From reading through doc after doc, and it still being fuzzy, I'm thinking I may need to use the form_post response mode kind of like this?: response_type: 'code id_token', client_id: Env.get('APPLE_APP_ID'), redirect_uri: 'https://example.com/auth/apple/callback', state: '', scope: ['email', 'name'].join(' '), response_mode: 'form_post' My impression is that it would post a token, and the user data to my callback url, and that I can get the user's email and name from the user's first request and attach the token received to the user in my database. I just do not for the life of me understand how I could use this pattern with how my app is setup. Would I have to have a post handler and a page setup on the same route (I don't even know if Next.js allows something like that), and then from that, I send that data to my backend server and create the account with the data received? Even if all that worked, I don't think I would be able to set the user's session since I rely on the request being made from my frontend to my backend utilizing the set-cookie header. Please let me know your thoughts, input, or clarifications. Thanks, Brody
2
0
3.3k
Nov ’21
Invalid_uri , configuring Webpage for apple sign in
Hi below is my code , I am getting invalid uri , I really need this to work , can someone please help ? I went through all the articles nothing worked Under the Service ID configuration domain : api.oro.art return URL : https://api.oro.art:3000 let init = function(){ console.log("APP START FOR APPLE"); window.AppleID.auth.init({ clientId : 'art.oro.services', scope : 'name email', redirectURI : 'https://api.oro.art:3000', state : 'openssl_random_pseudo_bytes', usePopup: true }); console.log("Got to the end"); }
0
0
517
Oct ’21
Apple Store Rejection due to sign in with apple issue
Our iOS app rejected by apple store saying, "We discovered one or more bugs in your app. Specifically, your app displays an error message when we logged in via Sign in with Apple. Please review the details below and complete the next steps." However, our app uses our company’s own account setup and sign-in systems (OpenID Identity Provider). As per the Apple store review guideline 4.8, we don't need to include sign in with apple option. In our company's own account setup and sign-in system integrated all third-party login (Facebook, google etc.) and sign in with apple too. But in order to sign into the app, specific email should be authenticated from our company user pool. If user (email address) not exist in the user pool, user may receive error message saying, You don't have required permission Please help on approval process. Are there any guideline violations?
0
0
1.2k
Aug ’21
Sign in with Apple - Unifying user sign in coming from two service ids under different teams
I've read in the documentation the private relay and user identifier (sub) are team scoped. If I have 2 or more teams that have their separate Sign in with Apple service ids configured, each under their own (separate) team account is there any way to unify these into one common service id so that the team-scoped user identifier is the same whether the user signs in through Team1-AppleServiceId1 or Team2-AppleServiceId2?
0
0
636
Aug ’21
Response with just the code on redirect at apple signin
I implemented a apple signin on reactjs using the lib react-apple-login, the authentication is working with no problems, but on redirect to my API I only receive the code, none of the other data came on request
Replies
1
Boosts
0
Views
1.4k
Activity
Nov ’21
Apple sign-in troubles with use case
Hello, I'm currently struggling to figure out how I can make Apple sign in work with my app configuration. Maybe I'm just dumb, but I really can't figure out what I need to do to make it work. So I have a Next.js app setup server-side rendering my React frontend, and on a separate server, I have a Node.js (specifically Adonis.js) backend/api which I use to handle auth and sessions. I have both Facebook and Google OAuth2 logins setup and working perfectly, where I'm receiving a code as a query param in my callback url to my frontend, which the client then sends that code to my backend/api, which uses that code with the provider (FB or Google) to get their email, name, and any other data I could use to prevent the user from having to add later, and either create the user and log them in, or just log them in if they already exist using cookies. I don't need any sort of write access to their third party account, or anything more than reading their name and email so they don't have to enter it themselves, and so they don't have to enter a password on my site. There are 2 different questions I have. (and if there is a solution to the first one, it would make my life so much easier ha..) If I use these query params similar to how I would with Google or Facebook: response_type: 'code', client_id: Env.get('APPLE_APP_ID'), redirect_uri: 'https://example.com/auth/apple/callback' state: '', scope: '', response_mode: 'query' And I get redirected back to my frontend with the code in the url params, and I send it to my API like I do with Facebook/Google, is there any endpoint with Apple's system that I can use that code to request the user's email and name from? 2. From reading through doc after doc, and it still being fuzzy, I'm thinking I may need to use the form_post response mode kind of like this?: response_type: 'code id_token', client_id: Env.get('APPLE_APP_ID'), redirect_uri: 'https://example.com/auth/apple/callback', state: '', scope: ['email', 'name'].join(' '), response_mode: 'form_post' My impression is that it would post a token, and the user data to my callback url, and that I can get the user's email and name from the user's first request and attach the token received to the user in my database. I just do not for the life of me understand how I could use this pattern with how my app is setup. Would I have to have a post handler and a page setup on the same route (I don't even know if Next.js allows something like that), and then from that, I send that data to my backend server and create the account with the data received? Even if all that worked, I don't think I would be able to set the user's session since I rely on the request being made from my frontend to my backend utilizing the set-cookie header. Please let me know your thoughts, input, or clarifications. Thanks, Brody
Replies
2
Boosts
0
Views
3.3k
Activity
Nov ’21
Invalid_uri , configuring Webpage for apple sign in
Hi below is my code , I am getting invalid uri , I really need this to work , can someone please help ? I went through all the articles nothing worked Under the Service ID configuration domain : api.oro.art return URL : https://api.oro.art:3000 let init = function(){ console.log("APP START FOR APPLE"); window.AppleID.auth.init({ clientId : 'art.oro.services', scope : 'name email', redirectURI : 'https://api.oro.art:3000', state : 'openssl_random_pseudo_bytes', usePopup: true }); console.log("Got to the end"); }
Replies
0
Boosts
0
Views
517
Activity
Oct ’21
Clarification: How can I support the "Sign in with Apple" in below 12 iOS versions
I need to know how can I support the Sign in with apple in lower versions. Shall I need to create any web and then set this in app's button to launch the web in side the app? What are the easiest way to make this as working condition. Note: We have backened support to make this as workable one.
Replies
0
Boosts
0
Views
584
Activity
Oct ’21
AppleJS & MusicKit JS
Is it possible to exchange applejs authentication code for a music user token? Basically - Is it possible to use apple signin with music kit without users needing to sign in twice to apple?
Replies
1
Boosts
0
Views
1.3k
Activity
Oct ’21
Apple Store Rejection due to sign in with apple issue
Our iOS app rejected by apple store saying, "We discovered one or more bugs in your app. Specifically, your app displays an error message when we logged in via Sign in with Apple. Please review the details below and complete the next steps." However, our app uses our company’s own account setup and sign-in systems (OpenID Identity Provider). As per the Apple store review guideline 4.8, we don't need to include sign in with apple option. In our company's own account setup and sign-in system integrated all third-party login (Facebook, google etc.) and sign in with apple too. But in order to sign into the app, specific email should be authenticated from our company user pool. If user (email address) not exist in the user pool, user may receive error message saying, You don't have required permission Please help on approval process. Are there any guideline violations?
Replies
0
Boosts
0
Views
1.2k
Activity
Aug ’21
Sign in with Apple - Unifying user sign in coming from two service ids under different teams
I've read in the documentation the private relay and user identifier (sub) are team scoped. If I have 2 or more teams that have their separate Sign in with Apple service ids configured, each under their own (separate) team account is there any way to unify these into one common service id so that the team-scoped user identifier is the same whether the user signs in through Team1-AppleServiceId1 or Team2-AppleServiceId2?
Replies
0
Boosts
0
Views
636
Activity
Aug ’21