You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're in the process of rebuilding profile into a Rails app and are making an attempt to better align with OIDC standards. While rpf-accounts will support login_options=force_signup, it will be deprecated in favour of the OIDC-compliant prompt=create
What we need to do
There are multiple ways we could tackle this
Add a setup lambda to the omniauth_openid_connect config
Add a setup lambda to openid_connect_options in lib/rpi_auth/engine.rb
Check for presence of prompt request param
If param is present, update strategy options to set prompt to provided value
See sample code in references section
Allow prompt as an authorize param
We need to test if this will work, since prompt is a specially handled param by omniauth_openid_connect
Update allow_authorize_params in lib/rpi_auth/engine.rb to include :prompt
Add a second provider explicitly for sign up
Update lib/rpi_auth/engine.rb to provision a second provider for rpi_signup
Apps would then just hit /auth/rpi_signup rather than having to set the prompt param
Common tasks regardless of approach
Update docs to include information on how to force signup using the prompt, and the deprecation of force_signup
Bump minor version as this is a non-breaking change
Write tests
Release new version
Communicate change to teams
Acceptance criteria
Feature: …
As a …
I want to …
So that ….
Scenario: …
Given I provide prompt=create to the auth route provided by rpi_auth
When I am redirected to rpf-accounts
Then I am shown the sign up page rather than the log in page
References
setup lambda
Note
This code was generated by Claude and not verified. It should be reviewed and tested before use
setup: lambdado |env|
request=Rack::Request.new(env)strategy=env['omniauth.strategy']ifrequest.params['prompt'].present?# Depending on your gem version this key may be# `extra_authorize_params` or `authorize_params` — see note below.strategy.options[:extra_authorize_params] ||= {}strategy.options[:extra_authorize_params][:prompt]=request.params['prompt']endend,
Important
Why are we doing this?
We're in the process of rebuilding profile into a Rails app and are making an attempt to better align with OIDC standards. While
rpf-accountswill supportlogin_options=force_signup, it will be deprecated in favour of the OIDC-compliantprompt=createWhat we need to do
There are multiple ways we could tackle this
Add a
setuplambda to theomniauth_openid_connectconfigsetuplambda toopenid_connect_optionsinlib/rpi_auth/engine.rbpromptrequest parampromptto provided valueAllow prompt as an authorize param
We need to test if this will work, since prompt is a specially handled param by omniauth_openid_connect
allow_authorize_paramsinlib/rpi_auth/engine.rbto include:promptAdd a second provider explicitly for sign up
lib/rpi_auth/engine.rbto provision a second provider for rpi_signup/auth/rpi_signuprather than having to set the prompt paramCommon tasks regardless of approach
force_signupAcceptance criteria
Scenario: …
References
setup lambda
Note
This code was generated by Claude and not verified. It should be reviewed and tested before use
Notes
Open questions