Skip to content

meisken/apollo-auth-express

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apollo Auth Api

The headers must be included:

  • accept

    • The value is "accept-request"
  • csrf-token
    • You can get the value from /csrf-token. Also there will leave a cookie with the key "csrf-token"

The graphql doc:

    type User{
        id: ID,
        username: String,
        email: String,
        admin: Boolean,
        confirmed: Boolean,
        pictureUrl: String
    }
    type AuthPayload{
        user: User,
        refreshToken: String
    }
    extend type Query {
        getUser(id: ID!): User,
        isLoggedIn(accessToken: String,ip: String): User,
        isValidForgotPasswordToken(forgotPasswordToken: String!): Boolean,
    }
    extend type Mutation {
        register(username: String!, email: String!, password: String!): Boolean,
        login(email: String!, password: String!): AuthPayload,
        confirmUser(token: String!): Boolean,
        forgotPassword(email: String!): Boolean,
        resetPassword(token: String!,newPassword: String!): Boolean,
        logout: Boolean,
        logoutAll: Boolean,
        updateUserInfo(
            refreshToken: String
            username: String,
            password: String,
            picture: Upload
        ): User,
    } 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published