Unity - SignInWithApple how to use rawnonce-nonce

135 views
Skip to first unread message

Muhsin Ege

unread,
May 22, 2021, 12:16:24 PM5/22/21
to Firebase Google Group

Hi everyone,

We are trying to provide multiple authentication options for our users, I have managed all the other authentication providers but SIWA. Tried to read every document and looked at the quickstarts but there are no information about how to use nonce and rawnonce.

I have generated random string which has a length of 32 as a rawnonce and sha256 copy of it as a nonce, I understand that i need to pass the rawnonce string to firebase for authentication but i have no clue what do whit the nonce?

Have some questions about it for understanding how it works, if a user deletes the game or clear the cache, i have to generate new rawnonce and nonce. Will it authenticate the user without problem? It says store the sha256 version of nonce but is it possible to store it permanently on a device?

Thanks for all the information! Cheers :)

David Della Bitta

unread,
May 24, 2021, 10:48:39 AM5/24/21
to fireba...@googlegroups.com
HI Muhsin,

I've created a reply to your post in the Unity Quickstart with an example on how to edit the SignInWithApple Unity plugin so that it uses a nonce when creating the SignInWithApple request.  Please look it over and reply to that post with any questions or problems that you have.

Unfortunately storing nonces isn't possible. A nonce is essentially  `a random number used only once` and is used here to prevent replay attacks -- you will need to regenerate the Nonce and SignInWithApple requests for every auth operation.

Best regards,
Dave Della Bitta


--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/c23da21e-8e9c-4088-a9a8-cda1b64ed136n%40googlegroups.com.


--

David Della Bitta | Software Engineer | ddell...@google.com | 

Muhsin Ege

unread,
May 26, 2021, 9:03:57 AM5/26/21
to fireba...@googlegroups.com
Hi David. 

Sorry i haven't seen your email. I have implemented your walk through your iterations but i endup with some error. You can see more details on the github issue. 

Best Regards

'David Della Bitta' via Firebase Google Group <fireba...@googlegroups.com>, 24 May 2021 Pzt, 17:48 tarihinde şunu yazdı:
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/4H-s0jjpb_s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CAErwY1PydQssUp0askWjX8YHD7xurdARjOMo23UsQnO0ZQ013g%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages