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

feat(ee): implement user authentication api #912

Merged
merged 4 commits into from
Dec 1, 2023

Conversation

darknight
Copy link
Contributor

@darknight darknight commented Nov 28, 2023

For closing #805

Changes include:

  • Update GraphQL schema, add 4 mutations, generated schema looks like
type Mutation {
  register(
    email: String!
    username: String!
    password1: String!
    password2: String!
  ): RegisterResponse!
  tokenAuth(
    email: String
    username: String
    password: String!
  ): TokenAuthResponse!
  verifyToken(token: String!): VerifyTokenResponse!
}

The refreshToken implementation has not been finalized, so I do plan to raise separate PR for it.

  • Update mutation resetRegistrationToken, only admin is allowed to execute it

There are some implementations need to be discussed, comment inline.

@darknight darknight marked this pull request as draft November 28, 2023 15:10
ee/tabby-webserver/src/db.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/db.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/authentication.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/schema.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/schema.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/repositories.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/schema.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/db.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/db.rs Outdated Show resolved Hide resolved
@darknight darknight changed the title feat(ee): implement user authentication and authorization feat(ee): implement user authentication Nov 29, 2023
@darknight darknight marked this pull request as ready for review November 30, 2023 03:13
ee/tabby-webserver/src/db.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/server/auth.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/server/auth.rs Show resolved Hide resolved
ee/tabby-webserver/Cargo.toml Outdated Show resolved Hide resolved
ee/tabby-webserver/graphql/schema.graphql Outdated Show resolved Hide resolved
ee/tabby-webserver/graphql/schema.graphql Outdated Show resolved Hide resolved
ee/tabby-webserver/src/db.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/graphql/schema.graphql Outdated Show resolved Hide resolved
@darknight darknight force-pushed the i805-user-registration branch from 56e4894 to d82ec72 Compare November 30, 2023 04:36
@wsxiaoys wsxiaoys marked this pull request as draft November 30, 2023 09:10
@darknight darknight marked this pull request as ready for review November 30, 2023 12:44
Copy link
Member

@wsxiaoys wsxiaoys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for being patient on this PR, LGTM

ee/tabby-webserver/src/server/auth.rs Outdated Show resolved Hide resolved
ee/tabby-webserver/src/server/auth.rs Outdated Show resolved Hide resolved
@wsxiaoys wsxiaoys changed the title feat(ee): implement user authentication feat(ee): implement user authentication api Dec 1, 2023
@wsxiaoys wsxiaoys merged commit 79e7044 into TabbyML:main Dec 1, 2023
2 checks passed
@darknight darknight deleted the i805-user-registration branch December 1, 2023 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants