BenjaminFavre / keycloak-apple-social-identity-provider

Apple Social Identity Provider for Keycloak
Apache License 2.0
108 stars 53 forks source link

Resource not found when adding Apple provider #10

Closed maoliv closed 3 years ago

maoliv commented 3 years ago

After adding .jar and necessary configuration to Keycloak, Apple provider appears on Identity Providers selector.

However, when I select this option, Keycloak redirects to a not found page.

What can I do?

SalahAdDin commented 3 years ago

@maoliv Are you getting this problem on container?

I researched about different ways install it on Docker, but i can't. Next bug is trying to do it by saving the jar on the deployments folder:

14:21:47,015 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) WFLYDS0021: Deployment content /opt/jboss/keycloak/standalone/deployments/apple-social-identity-provider-1.0.2.jar appears to be incomplete and is not progressing toward completion. This content cannot be auto-deployed.

14:21:47,016 WARN [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) WFLYDS0014: Scan found content configured for auto-deploy that could not be safely auto-deployed. See details above. Deployment changes will not be processed until all problematic content is either removed or whether to deploy the content or not is indicated via a .dodeploy or .skipdeploy marker file. Problematic deployments are [apple-social-identity-provider-1.0.2.jar]

14:21:47,077 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0015: Re-attempting failed deployment apple-social-identity-provider-1.0.2.jar
maoliv commented 3 years ago

Yes, exactly. I'm trying to configure it on a jboss/kleyckoak docker container.

SalahAdDin commented 3 years ago

@maoliv See my issue, maybe you can figure out what is missing on your setup. If you can get success, please inform me how you did that.

Thank you.

maoliv commented 3 years ago

Now it's working on Docker! Apparently dependencies were wrong on my standalone-ha.xml file.

But I have another problem.

I created my Apple Identity Provider, but in Keycloak configuration redirect_uri is a readonly input with the value "https://localhost:8443/auth/realms/master/broker/apple/endpoint". When I try to log in with Apple, a "redirect_uri" error appears.

I've tested the same call in Postman changing redirect_uri to "https://example-app.com/redirect" and it works.

What can I do?

SalahAdDin commented 3 years ago

@maoliv how did you solve the problem with docker? Can you share your Dockerfile here?

maoliv commented 3 years ago

I didn't change anything on docker.

I downloaded jboss/keycloak docker image.

Then I copied files from the repo and .jar into the keycloak container using "docker cp" commands.

And finally I executed the add module command using jboss-cli.sh from a console inside the container.

SalahAdDin commented 3 years ago

It seems strange: i made all the process on the Dockerfile and it does not work. docker cp to where?

maoliv commented 3 years ago

For instance, if your docker container is called "test":

Copying file from local to your docker container: docker cp /path/to/my/file test:/tmp Copying from docker container to local: docker cp test:/tmp/file /path/to/

SalahAdDin commented 3 years ago

@maoliv i will review it later; as i mentioned above i downloaded it and installed it inside of our Dockerfile.

BenjaminFavre commented 3 years ago

Regarding your redirect_uri error @maoliv, you have to configure your exact return URL in Apple Console. This blog post explains it well even if Apple Console UI changed a bit: https://developer.okta.com/blog/2019/06/04/what-the-heck-is-sign-in-with-apple (section "Create a Services ID")