fix: SAML: invalid_code issue, missing user error signing up (#15522)

* fix: Error thrown due to missing user

* chore: Remove unnecessary logs

* fix: Remove PageWrapper in order to prevent double signIn

* Change profile typing to optional

* further type fix

* further type fix..
This commit is contained in:
Alex van Andel authored and GitHub committed 2024-06-24 14:53:23 +00:00
1 parent 7b69a6ab9c
commit dbf4be27ea
5 files changed
+4 -10

No files matched your search

@@ -17,7 +17,7 @@ export const getServerSideProps = async ({ req, res }: GetServerSidePropsContext
// Check if logged in user has an organization assigned
const session = await getServerSession({ req, res });
if (!session?.user.profile.organizationId) {
if (!session?.user.profile?.organizationId) {
return {
notFound: true,
};