-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrpi_auth.rb
More file actions
22 lines (20 loc) · 829 Bytes
/
rpi_auth.rb
File metadata and controls
22 lines (20 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
RpiAuth.configure do |config|
config.setup = lambda do |env|
request = Rack::Request.new(env)
if custom_scope = request.params['add-custom-scope']
env['omniauth.strategy'].options[:scope] += [custom_scope]
end
end
config.auth_url = 'http://localhost:9001'
config.auth_client_id = 'gem-dev'
config.auth_client_secret = 'secret'
config.scope = %w[email force-consent openid profile roles allow-u13-login require-parental-consent]
config.brand = 'codeclub'
config.host_url = 'http://localhost:3009'
config.identity_url = 'http://localhost:3002'
config.session_keys_to_persist = 'foo bar'
config.user_model = 'User'
# Redurect to the next URL
config.success_redirect = -> { "#{request.env['omniauth.origin']}?#{{ email: current_user.email }.to_query}" }
config.bypass_auth = false
end