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

Use POST to sign in. GET is not supported. #823

Closed
Neithenn opened this issue Jan 29, 2017 · 2 comments
Closed

Use POST to sign in. GET is not supported. #823

Neithenn opened this issue Jan 29, 2017 · 2 comments

Comments

@Neithenn
Copy link

Not sure if is a devise-token-auth issue but anyway I would like to post it just in case that someone else happens the same.

After I installed devise-tokenauth and ng-token-auth I tried authentication via facebook leading to this error:

{"errors":["Use POST /sign_in to sign in. GET is not supported."]}

my rails logs:

Started GET "/omniauth/facebook/callback?code=AQCJG_Oz26o9PADnpL_arsnTN5E38EFikWZDXiQHXEYki1wPNt4dkqpXHE_8SrbGbweh29VmGQleegapuvVf8jOQmVhtz1prLy7GLRr40i07O24M4iNY8WQFVqKD3TIRmqgsj-puaP61KzUdpR0LHw_yeeguX38FDV_4KjHAHa0D4OLipA6ofd78eXQoEhvdkvtFnguuJGfKt0N6eEj9m1h185F2jkZqaZAwh6lM_VQTnDiwOWy10IHYA62yXWk0MJv28AhhoszC-R7tdFvxAEwn6C7IsMhxY7aBZp6VJwegJyQBBydwXb5QpMnOi4oNLSvi6oKARQkQ5i8Mku5tcqTA&state=8bf6fcfb4dedcf2f22fa3bef875d0e91b63ac0c9b7a8f8a6" for ::1 at 2017-01-29 12:38:34 -0300
Processing by Devise::OmniauthCallbacksController#failure as HTML
  Parameters: {"code"=>"AQCJG_Oz26o9PADnpL_arsnTN5E38EFikWZDXiQHXEYki1wPNt4dkqpXHE_8SrbGbweh29VmGQleegapuvVf8jOQmVhtz1prLy7GLRr40i07O24M4iNY8WQFVqKD3TIRmqgsj-puaP61KzUdpR0LHw_yeeguX38FDV_4KjHAHa0D4OLipA6ofd78eXQoEhvdkvtFnguuJGfKt0N6eEj9m1h185F2jkZqaZAwh6lM_VQTnDiwOWy10IHYA62yXWk0MJv28AhhoszC-R7tdFvxAEwn6C7IsMhxY7aBZp6VJwegJyQBBydwXb5QpMnOi4oNLSvi6oKARQkQ5i8Mku5tcqTA", "state"=>"8bf6fcfb4dedcf2f22fa3bef875d0e91b63ac0c9b7a8f8a6"}
Redirected to http://localhost:3000/api/v1/auth/sign_in
Completed 302 Found in 4ms (ActiveRecord: 0.0ms)

Can't understand what's going on. Should my client start a Post method instead of get? is an issue of ng-token-auth?

I've seen another similar issue but was about CSFR.

@eugenio1590
Copy link

I think the correct route is '/omniauth/facebook?code=4554564.....'
I got the same error with google gem

@zachfeldman
Copy link
Contributor

Possible workaround posted. Closing for now

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