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

Rename Unintuitive Function Names in Authentication Flow #9623

Open
samyakpiya opened this issue Jan 14, 2025 · 1 comment · May be fixed by #9706
Open

Rename Unintuitive Function Names in Authentication Flow #9623

samyakpiya opened this issue Jan 14, 2025 · 1 comment · May be fixed by #9706

Comments

@samyakpiya
Copy link
Contributor

References

This is a follow up to PR #9288. For more context, look at this conversation.

Scope & Context

The functions Verify, Challenge, and their corresponding frontend counterparts (challenge, verify) have unclear and non-intuitive names. This creates confusion for developers working with the authentication flow. Updating these names will improve readability and maintainability of the code.

Current behavior

Currently, the following functions are named in a way that does not clearly indicate their purpose:

  • Backend:
    • Verify: Exchanges a login token for authentication tokens.
    • Challenge: Generates a login token from user credentials.
  • Frontend:
    • challenge: Corresponds to Challenge on the backend.
    • verify: Corresponds to Verify on the backend.

These names can be confusing to developers, as they do not directly describe the functions' behavior.

Expected behavior

Rename the functions to better reflect their purpose. Proposed changes:

  • Backend:
    • VerifyGetAuthTokensFromLoginToken
    • ChallengeGetLoginTokenFromCredentials
  • Frontend:
    • challengegetLoginTokenFromCredentials
    • verifygetAuthTokensFromLoginToken
@yadavshubham01
Copy link
Contributor

assign me this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants