forked from OpenNeo/impress
Emi Matchu
f483722af4
In this change, we wire up a new NeoPass OAuth2 strategy for OmniAuth, and hook up the "Log in with NeoPass" button to use it! The authentication currently fails with `invalid_credentials`, and shows the `owo` response we hardcoded into the NeoPass server's token response. We need to finally follow up on the little `TODO` written in there!
13 lines
269 B
Ruby
13 lines
269 B
Ruby
require "omniauth-oauth2"
|
|
|
|
module Strategies
|
|
class NeoPass < OmniAuth::Strategies::OAuth2
|
|
option :name, "neopass"
|
|
|
|
option :client_options, {
|
|
site: Rails.configuration.neopass_origin,
|
|
authorize_url: "/oauth2/auth",
|
|
token_url: "/oauth2/token",
|
|
}
|
|
end
|
|
end
|