Skip to content
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 Omniauth generator for auth0 #2111

Open
wants to merge 2 commits into
base: master
from
Open

Add Omniauth generator for auth0 #2111

wants to merge 2 commits into from

Conversation

@r6e
Copy link

@r6e r6e commented Aug 26, 2020

Issue#

No-Story

Description:

Add Omniauth callback hash generator for Auth0; specifically for their username/password logins. This should be a proper subset of callback hashes for all of their login types. Their hash is distinct from those created by existing generators.

I will be using this to test authentication logic, as well as ensure the data generated by FactoryBot is in-line with what is created in production. Auth0 claims to have 9K+ customers and handle 100M+ logins per day, so hopefully this generator will be useful for others as well.

#
# @return [Hash] An auth hash in the format provided by omniauth-auth0.
#
# @faker.version 2.13.0

This comment has been minimized.

@Zeragamba

Zeragamba Sep 28, 2020
Contributor

@faker.version should be next for new generators

assert_equal info[:nickname], raw_info[:nickname]
assert_instance_of Integer, raw_info[:updated_at]
assert boolean?(raw_info[:email_verified])
end

This comment has been minimized.

@Zeragamba

Zeragamba Sep 28, 2020
Contributor

additional tests that use the parameters should be added as well (eg. ensure the passed uid is used)

This comment has been minimized.

@vbrazo

vbrazo Nov 8, 2020
Member

agreed

# Generate a mock Omniauth response from Auth0.
#
# @param name [String] A specific name to return in the response.
# @param email [String] A specific email to return in the response.

This comment has been minimized.

@vbrazo

vbrazo Nov 8, 2020
Member

Suggested change
# @param email [String] A specific email to return in the response.
# @param email [String] A specific email to return in the response.
# @param nickname [String] A specific nickname to return in the response.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.