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

Prevent user with unverified email from accessing API #824

Merged
merged 7 commits into from Aug 2, 2022

Conversation

knolleary
Copy link
Member

Fixes https://github.com/flowforge/security/issues/3

This restricts the admin api so users with unverified emails cannot call it.
It is possible to poke holes in the api for specific routes by adding { config: { allowUnverifiedEmail: true } }

This also reworks the UX for such a user. It is now consistent with the 'expired password' ux - they don't get in to the platform to try doing anything:

image

We want to be more intentional over what routes tokens are allowed
to access.
@knolleary
Copy link
Member Author

One minor issue with the UX change here is there is no way for the user to log out. They will forever get this screen until they verify or the session cookie expires.

Bit of an edge case, but if you have multiple accounts and are testing the platform, you find yourself stuck and needing to open incognito browser windows.

@joepavitt joepavitt merged commit 6f6e11e into main Aug 2, 2022
@joepavitt joepavitt deleted the block-unverified-user branch August 2, 2022 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants