feat: sign up page added (#1306)
This commit is contained in:
parent
56a4e18a3c
commit
81f6562168
6 changed files with 175 additions and 60 deletions
|
|
@ -7,6 +7,7 @@ const nonValidatedRoutes = [
|
|||
"/magic-sign-in",
|
||||
"/reset-password",
|
||||
"/workspace-member-invitation",
|
||||
"/sign-up",
|
||||
];
|
||||
|
||||
const validateRouteCheck = (route: string): boolean => {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,18 @@ class AuthService extends APIService {
|
|||
});
|
||||
}
|
||||
|
||||
async emailSignUp(data: { email: string; password: string }) {
|
||||
return this.post("/api/sign-up/", data, { headers: {} })
|
||||
.then((response) => {
|
||||
this.setAccessToken(response?.data?.access_token);
|
||||
this.setRefreshToken(response?.data?.refresh_token);
|
||||
return response?.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
throw error?.response;
|
||||
});
|
||||
}
|
||||
|
||||
async socialAuth(data: any) {
|
||||
return this.post("/api/social-auth/", data, { headers: {} })
|
||||
.then((response) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue