Skip to content

Commit

Permalink
fix: Fixed setup flow for protected login
Browse files Browse the repository at this point in the history
  • Loading branch information
bahattincinic committed Jun 5, 2024
1 parent 50bc617 commit 1dab8bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Updating Swagger
Add the following environment variables to your web service:

```
DATABASE_TYPE=postgres
DATABASE_TYPE=postgresql
DATABASE_DSN=host=<host> user=<username> password=<password> dbname=<dbname> port=5432
```

Expand Down
4 changes: 3 additions & 1 deletion ui/src/pages/SetupPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ export default {
});
this.user.setConfig(resp);
this.user.setSetupCompleted(this.loginType, true);
this.user.setSetupCompleted(
this.loginType.code, true
);
if (loginType === loginTypeEnum.anonymous) {
this.$router.push('/');
Expand Down
3 changes: 1 addition & 2 deletions ui/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ router.beforeEach(async (to, from, next) => {

// Authentication Check
const loginNeeded = userStore.loginNeeded();

if (!loginNeeded) {
if (userStore.setupCompleted && !loginNeeded) {
const resp = await getUserConfig("");
userStore.setConfig(resp);
} else if (!userStore.isAuthenticated() && accessToken) {
Expand Down

0 comments on commit 1dab8bb

Please sign in to comment.