-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: rename functions and refactor native library calls into separate functions #126
feat: rename functions and refactor native library calls into separate functions #126
Conversation
size-limit report 📦
|
lib/ts/recipe/webauthn/index.ts
Outdated
@@ -311,7 +357,7 @@ export default class RecipeWrapper { | |||
* | |||
* @returns `{ status: "OK", ...}` if successful along a description of the user details (id, etc.) and email | |||
*/ | |||
static registerAndSignUp(input: { email: string; options?: RecipeFunctionOptions; userContext: any }): Promise< | |||
static registerUserWithSignUp(input: { email: string; options?: RecipeFunctionOptions; userContext: any }): Promise< |
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.
I think this name sounds a bit confusing. What would be the difference between register and signUp ?
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.
Agree with the changes, I have made them.
lib/ts/recipe/webauthn/index.ts
Outdated
@@ -358,7 +405,11 @@ export default class RecipeWrapper { | |||
* | |||
* @returns `{ status: "OK", ...}` if successful along a description of the user details (id, etc.) and email | |||
*/ | |||
static authenticateAndSignIn(input: { email: string; options?: RecipeFunctionOptions; userContext: any }): Promise< | |||
static authenticateUserWithSignIn(input: { |
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.
Same here. Sounds a bit confusing
@@ -354,9 +354,29 @@ export default function getRecipeImplementation( | |||
fetchResponse, | |||
}; | |||
}, | |||
registerAndSignUp: async function ({ email, options, userContext }) { | |||
registerUser: async function ({ registrationOptions }) { |
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.
i think this should contain some credential reference in the name, as the main purpose of this method is to generate the credential for a user (in order for the credential to be registered - either on sign up or, in the future, on registerCredential in their "profile" )
} | ||
|
||
throw error; | ||
const registerUserResponse = await this.registerUser({ registrationOptions }); |
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.
same here. The name should indicate that this is about the credential and not the user.
97aa10f
into
feat/webauthn-native-wrappers
Summary of change
This PR does the following:
Related issues
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
Documentation changes
(If relevant, please create a PR in our docs repo, or create a checklist here highlighting the necessary changes)
Checklist for important updates
frontendDriverInterfaceSupported.json
file has been updated (if needed)lib/ts/version.ts
webJsInterfaceSupported.json
file has been updated (if needed)package.json
package-lock.json
lib/ts/version.ts
npm run build-pretty
git tag
) in the formatvX.Y.Z
, and then find the latest branch (git branch --all
) whoseX.Y
is greater than the latest released tag.