Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sso with apple id not working #406

Closed
rolikeusch opened this issue Oct 11, 2022 · 9 comments
Closed

sso with apple id not working #406

rolikeusch opened this issue Oct 11, 2022 · 9 comments

Comments

@rolikeusch
Copy link

i have setup sso with apple id, but when try to login i get the message "invalid_request - response_mode must be form_post when ..." (see screenshot for full message)
i found something about this in the apple forum, not sure if this also related to my issue.

any idea how i can fix this?

image

Eugeny added a commit that referenced this issue Oct 29, 2022
@Eugeny
Copy link
Member

Eugeny commented Oct 29, 2022

I've fixed this issue, but unfortunately couldn't confirm it since I need to wait for my Service ID provisioning - could you give this build a try? https://github.com/warp-tech/warpgate/actions/runs/3352578787

@rolikeusch
Copy link
Author

I have now an other error message, but I think the url in the apple config is right - I used https://server-url/@warpgate/api/sso/return

Mit Apple‑ID anmelden

@Eugeny
Copy link
Member

Eugeny commented Oct 31, 2022

This means that the redirect URL generated by Warpgate doesn't match the one set in the Sign in with Apple configuration - you can see the actual redirect URL inside the SSO URL that Warpgate sends you to, e.g.:

https://appleid.apple.com/auth/authorize?response_type=code&client_id=com.warpgate.test&state=TVQhIfGywuWs4WB9X0T3nQ&code_challenge=klbY_EQhMNdugmfEgcEW4lmcFogVMoOD6ngc2kLKQ5Q&code_challenge_method=S256&redirect_uri=https%3A%2F%2Fwarpgate.com%3A8888%2F%40warpgate%2Fapi%2Fsso%2Freturn&scope=openid+email&response_mode=form_post&nonce=GOBBTJBf7C9glNyaN7vbAg

<-- &redirect_uri=https%3A%2F%2Fwarpgate.com%3A8888%2F%40warpgate%2Fapi%2Fsso%2Freturn

@rolikeusch
Copy link
Author

rolikeusch commented Oct 31, 2022

ah I see the problem. that's the url:

redirect_uri=https%3A%2F%2Fserver-url%3A8888%2F%40warpgate%2Fapi%2Fsso%2Freturn&scope=openid+email&response_mode=form_post&nonce=npucAM-3e6nS

and there ist the port 8888 hard coded? how can I change this? as my server is listen on port 443. in the config I have:

external_host: server-url

also if i append the port, there will still be 8888 used.

@Eugeny
Copy link
Member

Eugeny commented Oct 31, 2022

I see - you have a reverse proxy in front, right? Currently Warpgate is not aware that frontend and backend port numbers can differ and will use the port number from the config file to construct the URL. I'll need to add a new external_port option for each protocol

@rolikeusch
Copy link
Author

yes right, I have a proxy in front.

@Eugeny Eugeny closed this as completed in 6f39338 Oct 31, 2022
@Eugeny
Copy link
Member

Eugeny commented Oct 31, 2022

Should be fixed now - see https://github.com/warp-tech/warpgate/wiki/Warpgate-behind-a-reverse-proxy for configuration

@rolikeusch
Copy link
Author

not sure if you see this issue or if I have to open a new one. I think I have now everything set for Apple ID. I can also login with my Apple ID, but then I see this error:

invalid_client

but I don't know what code verification fails now.

@Eugeny Eugeny reopened this Nov 16, 2022
@Eugeny Eugeny closed this as completed in fffd799 Nov 21, 2022
@Eugeny
Copy link
Member

Eugeny commented Nov 21, 2022

Finally fixed! Please note that the config layout is now changed too - Warpgate will now generate the JWT token for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants