Feat: support email login (#490)
* may login with email * update login layout * update login style
This commit is contained in:
@@ -70,9 +70,10 @@ export class Client {
|
||||
}
|
||||
|
||||
auth(params: {
|
||||
provider: "mixin" | "github" | "bandu";
|
||||
provider: "mixin" | "github" | "bandu" | "email";
|
||||
code: string;
|
||||
phoneNumber?: string;
|
||||
email?: string;
|
||||
}): Promise<UserType> {
|
||||
return this.api.post("/api/sessions", decamelizeKeys(params));
|
||||
}
|
||||
@@ -81,7 +82,7 @@ export class Client {
|
||||
return this.api.get("/api/me");
|
||||
}
|
||||
|
||||
loginCode(params: { phoneNumber: string }): Promise<void> {
|
||||
loginCode(params: { phoneNumber?: string; email?: string }): Promise<void> {
|
||||
return this.api.post("/api/sessions/login_code", decamelizeKeys(params));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user