Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed GEWIS login #75

Merged
merged 8 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ const router = createRouter({
{
path: '',
component: LoginView,
name: 'login'
name: 'login',
alias: ['/login'],
},
{
path: '/passwordreset',
Expand Down
3 changes: 1 addition & 2 deletions src/views/LoginView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ const password = loginForm.defineComponentBinds('password');
const route = useRoute();

onBeforeMount(() => {
console.log(route.query.token);
CodeNamedRobin marked this conversation as resolved.
Show resolved Hide resolved
CodeNamedRobin marked this conversation as resolved.
Show resolved Hide resolved
if (route.query.token !== undefined) {
const token = route.query.token as string;
authStore.gewisWebLogin(uuid(), token, apiService).catch(() => {
Expand Down Expand Up @@ -132,8 +133,6 @@ const loginHandler = loginForm.handleSubmit(async (values) => {
}
});

// TODO: fix the GEWIS login
// See: https://github.com/GEWIS/sudosos-frontend-vue3/issues/32
const loginViaGEWIS = () => {
window.location.href = `https://gewis.nl/token/${import.meta.env.VITE_APP_GEWIS_TOKEN}`;
};
Expand Down
3 changes: 1 addition & 2 deletions src/views/ProductsContainersView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ onMounted(async () => {
const vatGroupsResp = await apiService.vatGroups.getAllVatGroups();
vatGroups.value = vatGroupsResp.data.records;

// TODO: Put getAllContainers into container store and take care of pagination
// See: https://github.com/GEWIS/sudosos-frontend-vue3/issues/51

CodeNamedRobin marked this conversation as resolved.
Show resolved Hide resolved
await apiService.container.getAllContainers(500, 0).then((resp: any) => {
(resp.data.records as ContainerResponse[]).forEach((container) =>
apiService.container.getSingleContainer(container.id).then((res) => {
Expand Down