Skip to content

Commit dbd49c1

Browse files
authored
Merge pull request #221 from CenterForOpenScience/feat/sign-up
Feat/sign up
2 parents 46ad6a7 + c0f0f4f commit dbd49c1

34 files changed

+394
-453
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"diff": "^8.0.2",
4848
"markdown-it": "^14.1.0",
4949
"markdown-it-video": "^0.6.3",
50+
"ngx-captcha": "^13.0.0",
5051
"ngx-cookie-service": "^19.1.2",
5152
"ngx-markdown-editor": "^5.3.4",
5253
"primeflex": "^4.0.0",

src/app/app.routes.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,21 @@ export const routes: Routes = [
4040
data: { skipBreadcrumbs: true },
4141
},
4242
{
43-
path: 'sign-up',
43+
path: 'register',
4444
loadComponent: () =>
4545
import('./features/auth/pages/sign-up/sign-up.component').then((mod) => mod.SignUpComponent),
4646
data: { skipBreadcrumbs: true },
4747
},
4848
{
49-
path: 'forgot-password',
49+
path: 'forgotpassword',
5050
loadComponent: () =>
5151
import('./features/auth/pages/forgot-password/forgot-password.component').then(
5252
(mod) => mod.ForgotPasswordComponent
5353
),
5454
data: { skipBreadcrumbs: true },
5555
},
5656
{
57-
path: 'reset-password',
57+
path: 'resetpassword/:userId/:token',
5858
loadComponent: () =>
5959
import('./features/auth/pages/reset-password/reset-password.component').then(
6060
(mod) => mod.ResetPasswordComponent

src/app/core/components/header/header.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ export class HeaderComponent {
2929
command: () => this.router.navigate(['my-profile']),
3030
},
3131
{ label: 'navigation.settings', command: () => this.router.navigate(['settings']) },
32-
{ label: 'navigation.logOut', command: () => console.log('Log out') },
32+
{
33+
label: 'navigation.logOut',
34+
command: () => {
35+
document.cookie = 'auth_token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
36+
this.router.navigate(['/']);
37+
},
38+
},
3339
];
3440
}

src/app/core/constants/ngxs-states.constant.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { AuthState } from '@core/store/auth';
21
import { UserState } from '@core/store/user';
2+
import { AuthState } from '@osf/features/auth/store';
33
import { MeetingsState } from '@osf/features/meetings/store';
44
import { ProjectMetadataState } from '@osf/features/project/metadata/store';
55
import { ProjectOverviewState } from '@osf/features/project/overview/store';

src/app/core/store/auth/auth.actions.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/app/core/store/auth/auth.selectors.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/app/core/store/auth/auth.state.ts

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/app/features/auth/helpers/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/app/features/auth/helpers/sign-up.helper.ts

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
export interface LoginCredentials {
2-
email: string;
3-
password: string;
4-
}
5-
61
export interface AuthResponse {
72
accessToken: string;
83
}

0 commit comments

Comments
 (0)