Services Plugins FAQs

Signi in with apple - Authorize user Error

Hello,
I did exactly like the documentation.Here is the error I get in the url of my sign up page once loging in with Apple : code=400&message=Plugin%20action%20Apple%20SignIn%20-%20Authorize%20User%20error

I don’t know where this error comes from, maybe from the authorize user action ?

Here is my key if you wanna help me thanks!

-----BEGIN PRIVATE KEY-----\nMIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgQRzlOTj1FtqrRvK7\nBrTkEVgAHwcXuUj+pfPeuruqIX6gCgYIKoZIzj0DAQehRANCAATwPpwX/tcsYcMc\nDPoYJUbgbq6FzQizy2PtjLaqFIBKJV97Cg5HS6694KYueBYXq2ptZjjzQkyZZDtq\nT5Ablsy9\n-----END PRIVATE KEY-----

Hello, @jellowfishx
Thanks for reaching out.

First of all, allow me to mention that you have not edited the leys, as it pointed within our Documentation:

The Private Key in the endpoint, downloaded from Apple, might contain /n characters. You will need to remove these /n characters from your key. Please follow the steps bellow:

  1. Download the file from Apple with the key

  2. Open the key through Notepad++ (or any code editor you prefer)

  3. Here is how to “find and replace” in Notepad++ ;

  4. Paste the edited key into the Private Key field.

The key should look like this after removing the /n characters:
image

Please edit your key, accordingly to the instructions above and let me know if all is working now.
Best regards

Hello @Ecaterina, I had edited the private key but I am still getting the error so I posted the raw key here (in case I did something wrong, even though I followed your documentation). Sorry if I was not clear but I do not know where this error comes from, but suspected it might come from that.

Here is my edited key btw :
-----BEGIN PRIVATE KEY-----
MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgQRzlOTj1FtqrRvK7
BrTkEVgAHwcXuUj+pfPeuruqIX6gCgYIKoZIzj0DAQehRANCAATwPpwX/tcsYcMc
DPoYJUbgbq6FzQizy2PtjLaqFIBKJV97Cg5HS6694KYueBYXq2ptZjjzQkyZZDtq
T5Ablsy9
-----END PRIVATE KEY-----

Here is the full error code that displays in the URL :
code=400&message=Plugin%20action%20Apple%20SignIn%20-%20Authorize%20User%20error%3A%20%0AError%3A%20Request%20failed%20with%20status%20code%20400%0A%20%20%20%20at%20createError%20(%2Fvar%2Ftask%2Fnode_modules%2Faxios%2Flib%2Fcore%2FcreateError.js%3A16%3A15)%0A%20%20%20%20at%20settle%20(%2Fvar%2Ftask%2Fnode_modules%2Faxios%2Flib%2Fcore%2Fsettle.js%3A17%3A12)%0A%20%20%20%20at%20IncomingMessage.handleStreamEnd%20(%2Fvar%2Ftask%2Fnode_modules%2Faxios%2Flib%2Fadapters%2Fhttp.js%3A260%3A11)%0A%20%20%20%20at%20IncomingMessage.emit%20(events.js%3A326%3A22)%0A%20%20%20%20at%20endReadableNT%20(_stream_readable.js%3A1241%3A12)%0A%20%20%20%20at%20processTicksAndRejections%20(internal%2Fprocess%2Ftask_queues.js%3A84%3A21)%0A%0AError%3A%20Outer%20Error%20(see%20above%20for%20inner%20error)%0A%20%20%20%20at%20Block.wait%20(%2Fvar%2Ftask%2Fu.js%3A420%3A34)%0A%20%20%20%20at%20Object.async_fn%20%5Bas%20async%5D%20(%2Fvar%2Ftask%2Findex.js%3A302%3A35)%0A%20%20%20%20at%20eval%20(eval%20at%20build_function%20(%2Fvar%2Ftask%2Findex.js%3A72%3A21)%2C%20%3A50%3A20)%0A%20%20%20%20at%20%2Fvar%2Ftask%2Findex.js%3A335%3A23%0A%20%20%20%20at%20run_fn%20(%2Fvar%2Ftask%2Fu.js%3A594%3A18)

Hello, @jellowfishx
Thanks for the details.

Please let me know if you have followed this documentation: What the Heck is Sign In with Apple? | Okta Developer

Here you can find the instructions on how to set your own Apple Developer Account.

If yes, I need to see the screenshots of your configuration of the plugin (button settings and the workflow) for investigation.

Looking to hear you soon.
Best regards,

@Ecaterina okay so I tested putting a create a new thing before and after the “authorize user” action → the one before was created, the one after not. So the problem does come from the authorize user action.

Yes I did follow exactly the documentation. Could you please confirm me that I did not mess up with my private key when removing the \n (I showed you both the raw and the edited above).
If the private key is good, I can send you my editor link.
(I ask you that because even though I followed the documentation, I am not familiar with that and suspect it might come from that).
Thank you very much!!

Hello, @jellowfishx

As for the key, please note that you have not removed all / from this field.

We can still find some symbols. Please verify it one more time.

We enter the user’s application just as an exception in the case when the user already carefully verified the documentation for the product.
Thus, please check the entire documentation. If you are sure that you followed it, but the issue remains, you can add my team as a collaborator to your app. This will allow us to check your settings and run some tests to fix the mentioned problem.

To add our Support Team as a collaborator, you need to do the following steps in the Bubble Editor:

Settings > Collaboration > Add email support@zeroqode.com

Note: avoid the warning message regarding the plan, as we are an agency and you can easily add us to your collaborators.

Looking to hear you soon.
Regards,

What symbols? There are no “\n” left, but there is a “/t” and a “+” but it is not written in the documentation that they should be dealt with…
Sorry but can you tell me exactly what my key is after the changes, I’m not a master of that and it was supposed to be “easy” to implement. Exactly please.

Hello, @jellowfishx
Sorry for the inconvenience.

Here is your key:
-----BEGIN PRIVATE KEY-----MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgQRzlOTj1FtqrRvK7BrTkEVgAHwcXuUj+pfPeuruqIX6gCgYIKoZIzj0DAQehRANCAATwPpwX/tcsYcMcDPoYJUbgbq6FzQizy2PtjLaqFIBKJV97Cg5HS6694KYueBYXq2ptZjjzQkyZZDtqT5Ablsy9-----END PRIVATE KEY-----

If the issue is still reproduced, please share the screenshot of the error (not just the code).
Also, please share the screenshots of your settings (endpoint, workflow, button settings). It will help me to speed the process of investigation.

Looking to hear from you soon.
Best regards,

1 Like

Hello @Ecaterina , thank you for giving me the key, I copy/pasted it and … there is still the error.
The workflow stop at “authorize user”
Here are all the screen shots, even though most of them are useless still it stops at the step 1 (authorize users):

(the end of the WF:)



URL workflow :




Sign up button :

And the keys I entered are good.

Hello, @jellowfishx
Sorry for my late reply.

I have analyzed the screenshots and have some comments on them:

  1. Please change the button style, as is indicated on the Demo Page:

  2. Please move the end of the key to a new line:

3.Please provide me the screencast, were you trying to use the button within your application. I need to see, which exactly the error was reproduced.

  1. Here should be “applesignin”, but not just simply “apple”, as it mentioned on the Demo page settings.



  2. Please share with us the screenshot with the settings from the Developer console of Apple:

Looking to hear you soon.
Best regards,

I changed everything like you said (“applesingin” with the typo)
This is my settings in my service identifier (if I did not mistook what you asked):

I just noticed that my private key is the same as zeroqode demo’s editor btw, so I could have copy pasted before…
(or maybe it is a bug and this is why my thing doesn’t work???)

This is driving me crazy, I doublechecked everything and my editor is the same as yours.
Maybe some people in your team know what the error code means and therefore we will be able to find the solution.

Other settings that can interest you, but for real I did exactly like what you said, I changed apple to applesingin, changed it everywhere it was needed in the workflows and in the redirect URL, remove the / at the end…


B3
Team : B4 TEAM
Plugin :

Hello, @jellowfishx
Sorry for my late reply here :pray:

You for sure can’t use our keys within your application, I’m afraid. In case you are using the wrong keys - the application will not run the flow.
Also, we really need to receive the screenshot of the error, but not just this code.

The workflow seems to be correct, and for this reason, I have mentioned that your return URL or other settings from the Apple Developer Account are incorrect.

The return URL is set incorrect here:


Enter the domain name your app will eventually be running at, and enter the redirect URL for your app as well. If you want to follow along with this blog post, then you can use the placeholder redirect URL https://example-app.com/redirect which will catch the redirect so you can see the authorization code returned.

So, as I can see from your screenshot, you have a version-test in the redirect URL, API and etc.

Please check one more time this document and follow it completely:

Looking to hear you soon.
Regards,

You can clearly see that the keys generated in zeroqode’s editor and the one in mine are the same… :
Zeroqode :


Mine :

**So the return URL i had was : **
https://versusapp.bubbleapps.io/version-test/api/1.1/wf/applesingin
It is what you wrote in your documentation!!

I want to apologize if I miss out on something, but I clearly did what you said.

(If I remove it from my redirect URL, then I get (again) this error:
D
So how is it incorrect ? Putting https://bonus.social/redirect, https://bonus.social/version-test/redirect, or https://example-app.com/redirect doesn’t help at all)

Sorry but copy pasting this article doesn’t help me at all, you see that I have a very specific problem. Error seems to come from my authorization code.

Hello, @jellowfishx
I’m sorry to hear that.

The keys should not be the same. So, if they are the same - you should create a new key in your Apple Developer Account.
Unfortunately, I can’t log in to your account in order to create them by myself. However, in provided documentation, it was described very detail.

Such link is used for the initialization, but not for the redirect. Here, in the redirect URL, you should create the link in a next way: https:// name of your application ( without adding version-test.com/redirect). So, in case the name of your application is https://bonus.social.com/redirect.

Your user should be redirected to this page after he will successfully be signed within your application.

As a solution, I can propose you the next step: you can create from the very beginning the keys in the Apple console. Maybe, you just copied them incorrectly from the console, because they can’t be the same as ours.

Please check this one more time and let me know about the result.
Best regards,

Hello
I made a new key in my app store connect, changed them in the plugin tabs and when I create a new step “user authorization”, the key generated is still the same and it still doesn’t work.
(note that only the authorize user private key is the same as yours, not my services/key/team ID)

So as you said I added “https://bonus.social/redirect” as a return URL (I let the second one, because if I don’t put it here, when I click on the signin button I get the error, right), and it still doesn’t work.

I think I will stop losing my time with this plugin, it is not working.

Hello, @jellowfishx
I’m sorry to hear it.

Please allow me to mention that this plugin is workable for sure. Allow me to mention that creating the keys and filling all information in the Apple Developer Account is required not only by the plugin but by the Apple policy.

I am really wishing to help you, thus propose you add our Support Team email to the list of collaborators to your application and provide me a link to your application. This will allow us to check your settings in the Bubble Editor. We will check your application with our keys, and if all will be successful - the issue is definitely will be in the keys.

To add our Support Team as a collaborator, you need to do the following steps in the Bubble Editor:

Settings > Collaboration > Add email support@zeroqode.com

Note: avoid the warning message regarding the plan, as we are an agency and you can easily add us to your collaborators.

Looking to hear you soon.
Regards,

Thank you for your kindness, I added you as a collaborator in the hour :white_check_mark:
I really hope we can work it out, because it has really been driving me insane, as you could see.
Thanks, the page I was working on is “sign_up”.

feel free to ask me if you need something

Hello, @jellowfishx
Sorry for my late reply.

I will check your application in all possible ways and will let you know about the result. In case I will need any additional information - I will let you know :pray:
I will do my best to help you :slightly_smiling_face:

Best regards,