Add Omniauth generator for auth0 #2111
Open
Conversation
lib/faker/default/omniauth.rb
Outdated
| # | ||
| # @return [Hash] An auth hash in the format provided by omniauth-auth0. | ||
| # | ||
| # @faker.version 2.13.0 |
| assert_equal info[:nickname], raw_info[:nickname] | ||
| assert_instance_of Integer, raw_info[:updated_at] | ||
| assert boolean?(raw_info[:email_verified]) | ||
| end |
Zeragamba
Sep 28, 2020
Contributor
additional tests that use the parameters should be added as well (eg. ensure the passed uid is used)
| # 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. |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Issue#
No-StoryDescription:
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.