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

gomniauth: Parameter 'code' is required but missing. (Facebook provider) #16

Open
oleksandr opened this issue Feb 25, 2014 · 2 comments

Comments

@oleksandr
Copy link

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?

@matryer
Copy link
Member

matryer commented Feb 25, 2014

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.

@akonsu
Copy link

akonsu commented Jun 10, 2014

@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?

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

3 participants