Hey guys I am trying to implement sign in with app...
# ory-network
h
Hey guys I am trying to implement sign in with apple in Ory Cloud and am receiving this message
failed to decode PEM block containing private key
what could be the issue?
p
Hi @high-soccer-36695 How are you adding the private key to Ory? I believe they should be base64 encoded strings 🤔
h
I have it copied exactly how apple gave. is this not correct?
p
I think you need to first encode it to base64 and then give that to Ory
h
Okay I tried that still giving same error I have tried encoding all of this and just the key
Copy code
-----BEGIN PRIVATE KEY-----
.....
-----END PRIVATE KEY-----
I also ran the ruby script given in the documentation link to okta and still gave the same error
I am going to make new key try it out
still getting same error🤔
p
are you adding the key to your project through the Ory Console or Ory CLI?
h
console
p
try add the
base64://
prefix to the encoded string, e.g.
Copy code
base64://<encoded base64 string of private key>
h
No same error
p
I think this is then an error on our side within the console. /cc @limited-yak-77423
👍 1
l
@high-soccer-36695 Hey, can you try configuring via CLI? 🙂 The procedure is outlined here.
👍 1
h
Will try it out 👍
@limited-yak-77423 I was using sign in with google to access ory cloud so I had to set a password now I cannot sign in into ory at all. It keeps trying to create an account instead of signing me in, and the password I set does not work
when I sign in with google it just sends me to create an account
oh my bad I signed in with github 😅
cli worked though👍
p
Hi @high-soccer-36695 I will create an issue for the console so we can fix it. thank you for reporting this bug 🙂
👍 1
h
Do not think it should be base64 only the jsonnet snippet should be, I updated the config file through the cli and put in the
Copy code
-----BEGIN PRIVATE KEY-----
.... # Replace this with the content of the private key downloaded from Apple
-----END PRIVATE KEY-----
this worked documentation is here https://www.ory.sh/docs/kratos/social-signin/apple