feat: sign up page added (#1306)

This commit is contained in:
Aaryan Khandelwal 2023-06-16 19:00:04 +05:30 committed by GitHub
parent 56a4e18a3c
commit 81f6562168
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 175 additions and 60 deletions

View file

@ -7,6 +7,7 @@ const nonValidatedRoutes = [
"/magic-sign-in",
"/reset-password",
"/workspace-member-invitation",
"/sign-up",
];
const validateRouteCheck = (route: string): boolean => {

View file

@ -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) => {