Skip to content

Authentication failure on callback (crsf_detected) #25

@samratjp

Description

@samratjp

I'm using:

    omniauth-instagram (1.0.2)
      omniauth (~> 1)
      omniauth-oauth2 (~> 1)
    omniauth-oauth2 (1.3.1)
      oauth2 (~> 1.0)
      omniauth (~> 1.2)

ERROR -- omniauth: (instagram) Authentication failure! csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | CSRF detected

I don't know if this is helpful but found that this issue happens when you send along state and on callback it doesn't match.

And this is my callback url - Started
GET "/auth/instagram/callback?code=xxxxxxxxx&state=yyyyyyyy"

And my omniauth initializer setup is pretty vanilla too:

provider :instagram, OauthSecrets.instagram.client_id, OauthSecrets.instagram.client_secret

I assume this setup sends a state along? I know it's optiona but would be surprised if we're not doing this already?

Anyways, please let me know if you have any suggestions?

Thanks :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions