GithubHelp home page GithubHelp logo

omniauth-gitlab's People

Contributors

cmckni3 avatar deric avatar evheny0 avatar gitter-badger avatar iuri-gg avatar jasonbarnabe avatar jessieay avatar linchus avatar petergoldstein avatar stanhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

omniauth-gitlab's Issues

request.env['omniauth.auth'] is nil

I want to omniauth-gitlab with Gitlab CE 10.1. Authentication seems to be successful, but request.env['omniauth.auth'] is nil.

config/initializers/omniauth.rb

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :gitlab, "xxxxx", "xxxx",
  client_options: {
    site: "https://gitlab.example.com/api/v4",
  },
  redirect_url: "http://local.example.com:3000/auth/callback",
  scope: 'read_user'
end

is it a problem in my configuration?

Callback URL broken for relative URL installations

One of the breaking changes in OmniAuth 2.0+ relates to how relative
URL installations are handled. See:

As a result, when omniauth-gitlab is used with OmniAuth 2.0+ for an app that lives at a relative URl, the #callback_url is incorrect (the relative URL is included twice).

This is because OmniAuth is now prefixing the default Strategy#request_path and Strategy#callback_path with SCRIPT_NAME, but omniaiuth-gitlab is also adding script_name to callback_url.

omniauth/omniauth-oauth2#152 (comment)

Fixed our vendored version here: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/98120

OmniAuth v2.0.0rc1

Hello, maintainer of OmniAuth here.

I just wanted to make the maintainers of this gem aware of the discussion that I have opened regarding v2.0.0 of OmniAuth. I invite you to join in and voice any concerns you may have here: omniauth/omniauth#1017

Requires multi_json

While using the OA_GL gem, I was receiving errors when trying to authenticate to my GL server. The error I received was for line 57 of gitlab.rb in strategies.

It references MultiJson, but you do not have a require 'multi_json' at the top of this rb file.

Once I added the require line, it works like a charm.

Version 1.0.3 is not backwards compatible with 1.0.2 configuration (Gitlab error invalid_credentials)

Under version 1.0.2 configuring omniauth with your Gitlab instance domain name was sufficient:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :gitlab, ENV['GITLAB_APPLICATION_ID'], ENV['GITLAB_SECRET'],
           client_options: { site: 'https://example.com' }
end

Under version 1.0.3 it requires the api path to be specified.

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :gitlab, ENV['GITLAB_APPLICATION_ID'], ENV['GITLAB_SECRET'],
           client_options: { site: 'https://example.com/api/v4' }
end

Otherwise, trying to log in through Gitlab will fail with an invalid_credentials error from Gitlab.

This change was unexpected for a tiny version bump.

Allow other scopes to work

Is it possible to use other GitLab's scopes with this gem? At the moment it seems to work only when using the api scope. If read_user and openid are chosen on GitLab end it doesn't work. They return the following message: The requested scope is invalid, unknown, or malformed..

Getting Authentication failure! invalid_credentials

Here's the full error. I've been able to configure GitHub and Google devise/omniauth with problems.

E, [2016-02-12T10:54:55.373224 #15141] ERROR -- omniauth: (gitlab) Authentication failure! invalid_credentials: OAuth2::Error, invalid_grant: The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.

Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.