impress/lib/strategies/neopass.rb
Emi Matchu f483722af4 NeoPass strategy interacts with dev NeoPass server, which is still WIP
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!
2024-03-14 16:13:31 -07:00

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