Sign in with Apple test users - ios

Where could I create random test users in order to test "Sign in with Apple" ?
The sandbox users created for Apple pay doesn't work for this too.

There is no "test users" for Sign In with Apple, yet.
You need to use real accounts.
Update:
I had a call with an Apple engineer for during a WWDC 1-on-1 lab.
They suggested a method to re-use the same account for Sign in with Apple.
The downside with this method is that it will NOT return realUserStatus after the first login. Here is the method:
In iOS, go to the settings> Your name on top (Apple ID, iCloud, etc) > Password & security > Apps using your Apple ID > Edit and delete your app.
Now when you login, every thing should work as if it is the first time using Apple Sign In, except the realUserIndicator.

In apple document not mention about test with sandbox account. So you need to use real account to test.

You can test apple pay with sandbox testing account
the details are here
https://developer.apple.com/apple-pay/sandbox-testing/

Related

How to test sign-up flow with 'Sign in with Apple'

We're building a sign-up flow using 'Sign up with Apple'.
It seems fairly straightforward, but we can't find a good way to test sign ups. You have to use a real account, which means you can only ever sign up once. This is terrible for QA.
Has anyone found a good way round this? Are there any hacks that would allow us to create new Apple accounts for example?
You can revoke Sign In With Apple account association and test it again.
Go to iPhone Settings and select Apple Id
Go Password & Security
Apple ID logins
Select {YOUR APP}
Stop using Apple ID

Reset "Sign In with Apple" to the initial create account state

I am implementing Sign In with Apple and basically everything works, I don't need help with that. However, while testing my implementation, I want to reset back to before the first time I used Sign In with Apple, where it asks you if you want to create an account, and asks for the name and email address. Like this:
After you signed in that first time and then sign in again, it only asks if you want to sign in using your Apple ID, but skips the requestedScopes. So, how can I go back to that first state where it does ask for the requestedScopes info, like name and email?
Reinstalling the app didn't help.
You can revoke the app's permissions for your apple ID in your phone/simulator settings. I've attached the steps where you can find everything.
iPhone Settings, select your Apple account.
Password & Security
Apps Using Your Apple ID
Your app/app bundle ID
Stop using Apple ID

Cannot get name & email with sign in with Apple on real device

So I'm implementing sign in with Apple, everything goes well on the simulator, I request email, fullName scopes, the authenticate UI shows, and I can get the data, as images shown below:
But when testing on real device (iPadOS 13, iPad 2018), the UI didn't show (it does not asks for name and email on the UI), and I can't get the email, fullName from the response, and I can also confirm that the authorizedScopes are empty, I can only get the user identifier
I believe this is a bug and will file a radar, also posted a discussion on the Apple developer forum (but they usually won't approve my post, I don't know why)
If this is not a bug, can somebody tell me how to fix this?
Thanks
Problem solved! tl;dr
This is an expected behavior
Answered by Apple Engineer
(Original post link: https://forums.developer.apple.com/thread/121496)
Hi aslkdjalksdjasdasd,
This behaves correctly, user info is only sent in the ASAuthorizationAppleIDCredential upon initial user sign up. Subsequent
logins to your app using Sign In with Apple with the same account do
not share any user info and will only return a user identifier in the
ASAuthorizationAppleIDCredential. It is recommened that you securely
cache the initial ASAuthorizationAppleIDCredential containing the user
info until you can validate that an account has succesfully been
created on your server.
Patrick
2019/12/15 Edit
This behavior is also documented on Apple's Sign in with Apple doc, check the documentation.
Ensure that your app relays the credentials and user information to your app servers.
The API collects this information and shares it with your app the first time the user logs in to the app using Sign in with Apple. If the user then uses Sign in with Apple on another device, the API doesn't ask for the user’s name or email again. It collects the information again only if the user stops using Sign in with Apple and later reconnects to your app.
If someone fails in storing "user email", "first-name" first time, then he should follow the following steps:
iPhone Settings -> Apple Id -> Password & Security -> Apple ID logins -> {YOUR APP} > Stop using Apple ID.

Apple Verification Email requested for Sandbox Tester User ID

I'm having a problem getting the Test User sandbox IDs I've created in iTunesConnect to purchase a non-consumable product. I wait a day after I create the IDs before trying to use them. First, I make sure no ID is signed in according to Settings/iTunes & App Store on the device. Then, when I run my app in Simulator on a real device and click my Buy button and sign on with a Test User ID, I get a popup saying the ID must be verified and that a verification email will be sent if I click the Verify button. Now, I know I should not verify a Test ID (because according to this SO question/answer, that action turns the ID into an actual account). I'm also given the option to Ignore the verification -- if I click that, nothing happens -- I'd expect the purchase process to continue, but it doesn't. Yes, of course, I'm running the simulation on an actual device. And, though I start out with no ID entered in Settings for iTunes/App Store, when I go back after receiving the above, my own Apple ID now appears as signed-in! Could this have something to do with my activating Apple's Two-Factor Authentication? I just turned that on last week.
I have finally got iTunes Connect sandbox users to work. In order to do so I had to verify the sandbox user's account and hence needed a valid email address to do so.
Steps highlighted at the end
This goes against how I had always created and used sandbox users from day 1, but either there's been an undocumented change or is the current hack for the current iTunesConnect server maladies.
I can confirm that the receipt generated is a sandbox receipt.
The user is a sandbox user.
I have not entered nor paid with a credit card.
Steps to solve
Go to iTunesConnect -> Users & Roles -> Sandbox User and add a new user
Use a valid email address. Tip: A real gmail account and the + symbol can generate many valid emails. i.e. jon.doe+1#gmail.com, jon.doe+2#gmail.com etc where jon.doe#gmail.com is a valid gmail account.
Wait for verify email from iTunes.
Verify the sandbox user by clicking on verification link. Tip: Use incognito browser to keep your real and sandbox Apple sessions separate.

Facebook login error "User is not allowed to see the application."

Hi: I have submitted my app to the App Store. I have Facebook login feature in my app. When I try to login to Facebook from devices I have I am able to do it seamlessly. However Apple has rejected my app saying " When we tap the Facebook icon to sign up we are taken to mobile Safari where we receive a message that states :
User is not allowed to see the application.: The user is not allowed to see this application per the developer set configuration.
Not sure how will I be able recreate this issue. I installed my app on 3 different devices and was able to login without any errors. I checked my app setting on Facebook Status and Review section of Facebook and I have enabled my general public. Not sure what else I am missing. I just feel very dejected. Can anyone please help me figure this out? I am using parse as my backend service and logging users using parse Facebook login.
Thank you very much!
Another reason this will happen is if you are logged in as a test user from a different app than the one you are trying to sign in to. Facebook test users are app-specific.
Sign out of Facebook and back in with a test user from the correct app.
Go to Safari > http://m.facebook.com > logout
In cases where app sign in with safariviewcontroller, sometimes it contains test user of different app
In my case, I was using wrong facebook application id in the code. So added the correct id & it worked for me.
This issue occurs because Apple testers used the same Facebook test account which was created to test any other app and they did not logged out from that account(forgotten to log out) and that facebook test account doesn't have the permission for the current app in review which is why this issue occurs,
You can follow the given link to replicate the issue by creating an an test account.
http://samwize.com/2014/07/23/error-with-facebook-login-using-test-users/
Steps to create Facebook test account
https://developers.facebook.com/docs/apps/test-users#managetool
We had this problem, and it turned out that the problem app didn't have a namespace set up in the Settings > Basic tab. Creating one is the solution to this.
Recently I have faced this same issue. Presently Facebook doesn't allow you to login from any Facebook id as you app is in development mode. There are 3 possible solutions that work for me:
Use only that id for Facebook Log In Testing with which you are working in Facebook for developer.
In Facebook for Developer-> Login to your Account-> Open app->Roles-> Test Users-> Add->Submit-> Edit on newly created random tester account->"Change Name and Password for this Test User"-> Provide a Name and handy password for testing.->Submit.(Use the given random generated mail id and password for testing Facebook login through your app.
3)In Facebook for Developer-> Login to your Account-> Open app->Roles->Roles->Testers->Add Testers->Provide Facebook Id for the user you want to add as tester->Submit
To get Facebook Id for a valid user. Login to Facebook with the Id you want to make as facebook tester in your development process.Then goto profile and in URL of browser you see id=(some_random_number). Copy that Id and paste it into Add Tester section of Developer account. It will be in pending state until the valid user accept the inviation.
I had something similar when validating to apple too,
I still don't get it now but for some reason the facebook secret id had been erased from the parse configuration.
You must check that point too
I don't know if that was the reason or not but for me this happened only after I signed the application with a release key, so I made the app 'public'. Probably the test users doesn't work for public applications.
We had this problem, and the solution is to use the same FB test accounts that was created from the same FB App. So if the App get rejected from App, then you should send to Apple a FB test account with password.
my side
I was using wrong facebook application id in the code. So added the correct id & it worked for me.

Resources