-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for screen_hint=signup param #103
Changes from 2 commits
5694455
894d4e2
07484c5
a3d0b7b
4acfe1a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -123,6 +123,20 @@ | |||||||
expect(redirect_url).not_to have_query('connection') | ||||||||
end | ||||||||
|
||||||||
it 'redirects to hosted login page with screen_hint=signup' do | ||||||||
get 'auth/auth0?screen_hint=signup' | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's a existing test for checking that on a "normal authorize call" (without extra args) these keys are not part of the query. Let's add this one there, and also the ones that are missing from previous changes. The test is on these lines: omniauth-auth0/spec/omniauth/strategies/auth0_spec.rb Lines 84 to 86 in 894d4e2
Let's add a line for testing that the following keys are NOT in the query:
|
||||||||
expect(last_response.status).to eq(302) | ||||||||
redirect_url = last_response.headers['Location'] | ||||||||
expect(redirect_url).to start_with('https://samples.auth0.com/authorize') | ||||||||
expect(redirect_url).to have_query('response_type', 'code') | ||||||||
expect(redirect_url).to have_query('state') | ||||||||
expect(redirect_url).to have_query('client_id') | ||||||||
expect(redirect_url).to have_query('redirect_uri') | ||||||||
expect(redirect_url).to have_query('screen_hint', 'signup') | ||||||||
expect(redirect_url).not_to have_query('auth0Client') | ||||||||
expect(redirect_url).not_to have_query('connection') | ||||||||
end | ||||||||
|
||||||||
describe 'callback' do | ||||||||
let(:access_token) { 'access token' } | ||||||||
let(:expires_in) { 2000 } | ||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this line doing, allowing these keys to be taken from the URL query and setting them on the /authorize call?