gomniauth: Parameter 'code' is required but missing. (Facebook provider)
Opened this issue · 2 comments
When pressing Cancel at the Facebook page the following error is shown:
gomniauth: Parameter 'code' is required but missing.
The callback URL is the following:
http://localhost:8080/oauth2/callback/facebook?error=access_denied&error_code=200&error_description=Permissions+error&error_reason=user_denied&state=..........
I guess Facebook simply renamed parameters?
It's because that's an error response. You shouldn't call HandleCallback if an error is returned. You should do something else.
Make sense?
Sent from my iPhone
On Feb 25, 2014, at 3:20 AM, Oleksandr Lobunets notifications@github.com wrote:
When pressing Cancel at the Facebook page the following error is shown:
gomniauth: Parameter 'code' is required but missing.The callback URL is the following:
http://localhost:8080/oauth2/callback/facebook?error=access_denied&error_code=200&error_description=Permissions+error&error_reason=user_denied&state=..........I guess Facebook simply renamed parameters?
—
Reply to this email directly or view it on GitHub.
@matryer to me, as a beginner, what you said makes little sense. What is the proper way to handle callback? I am looking at the sample application: https://github.com/stretchr/gomniauth/blob/master/example/goweb/main.go#L102 and I have no idea how to properly check if this is an error response. Should I manually parse the query string at this point before I call CompleteAuth
?