mtchavez / ueberauth_gitlab

Gitlab OAuth2 Strategy fo Überauth
Other
7 stars 7 forks source link

Failed to use "oauth2" (version 2.0.0) #66

Closed Exadra37 closed 4 years ago

Exadra37 commented 4 years ago

Thanks for your work on this library :)

I am currently implementing several strategies and this one is the second, but is conflicting with the Github one:

mix deps.get
Resolving Hex dependencies...

Failed to use "oauth2" (version 2.0.0) because
  ueberauth_github (version 0.8.0) requires ~> 1.0 or ~> 2.0
  ueberauth_gitlab (version 0.1.0) requires ~> 0.8.2
  mix.lock specifies 2.0.0

** (Mix) Hex dependency resolution failed, change the version requirements of your dependencies or unlock them (by using mix deps.update or mix deps.unlock). If you are unable to resolve the conflicts you can try overriding with {:dependency, "~> 1.0", override: true}

And adding {:oauth2, "~> 2.0", override: true} to mix.exs solves the conflict, but then I get this error on an Authentication:

 %{
  current_user: nil,
  ueberauth_failure: %Ueberauth.Failure{
    errors: [
      %Ueberauth.Failure.Error{
        message: "An undefined error occured",
        message_key: "OAuth2"
      }
    ],
    provider: :gitlab,
    strategy: Ueberauth.Strategy.Gitlab
  }
}
Exadra37 commented 4 years ago

Closing as this is not the correct repo for the issue. Got confused because the names are the same in Github. So the correct repo is https://github.com/gballet/ueberauth_gitlab, and as you can see only the developer is different, but I noticed the slight difference in names from https://hexdocs.pm/ueberauth_gitlab/api-reference.html for gballet when compared with yours https://hexdocs.pm/ueberauth_gitlab_strategy/api-reference.html.

Anyway I am trying to use now your repo, but also running in issues, but will be a matter for another issue.