-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
fix: auth error handling #144
fix: auth error handling #144
Conversation
* udated clone url to make it clearer that it is a fork * bolded section titles
* chore: release v0.4.1-hotfix.3 * fix(data-migration): early return if no categories have parents (goniszewski#128) Signed-off-by: Robert Goniszewski <robertgoniszewski@outlook.com> * Closes goniszewski#130 (goniszewski#131) Signed-off-by: Robert Goniszewski <robertgoniszewski@outlook.com> * fix(database): use dynamic path for SQLite database file Signed-off-by: Robert Goniszewski <robertgoniszewski@outlook.com> * docs(readme): use single README file for latest/preview version Signed-off-by: Robert Goniszewski <robertgoniszewski@outlook.com> * feat(ci): add manual deployment workflow and adjust tag conditions Signed-off-by: Robert Goniszewski <robertgoniszewski@outlook.com> --------- Signed-off-by: Robert Goniszewski <robertgoniszewski@outlook.com>
Solves #143 |
@@ -2,26 +2,35 @@ | |||
|
|||
Thank you for considering contributing to this project! All contributors, big or small, are welcomed. To make the contribution process as smooth as possible, please follow the guidelines below. | |||
|
|||
## Prerequisites |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These steps are missing to get started for a new developer. if you want I can create separate PR for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, let's ship it with this PR. Thanks!
@@ -16,17 +17,10 @@ export const actions: Actions = { | |||
const existingUser = await getUserWithoutSerialization(login); | |||
|
|||
if (!existingUser) { | |||
const randomMs = Math.floor(Math.random() * 1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what was the point of this code.
- Why random wait?
- The function is already async it will always return a promise, returning
new Promise(....)
just adds a bit more work for compiler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was here to simulate request time, as immediate response means that the user doesn't exist.
When I think about it know, maybe it was too much precaution on my side :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are well-considered, just a bit of refinement or further discussion and we’ll be all set!
@@ -2,26 +2,35 @@ | |||
|
|||
Thank you for considering contributing to this project! All contributors, big or small, are welcomed. To make the contribution process as smooth as possible, please follow the guidelines below. | |||
|
|||
## Prerequisites |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, let's ship it with this PR. Thanks!
@@ -16,17 +17,10 @@ export const actions: Actions = { | |||
const existingUser = await getUserWithoutSerialization(login); | |||
|
|||
if (!existingUser) { | |||
const randomMs = Math.floor(Math.random() * 1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was here to simulate request time, as immediate response means that the user doesn't exist.
When I think about it know, maybe it was too much precaution on my side :)
src/routes/signup/+page.server.ts
Outdated
@@ -41,9 +43,11 @@ export const actions: Actions = { | |||
}>({ | |||
name: Joi.string().min(3).max(31).optional(), | |||
username: Joi.string().min(3).max(31), | |||
email: Joi.string().email().optional(), | |||
email: Joi.string().email().required(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not yet sure if email is necessary. Not at the time, at least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so maybe let's make it optional for now.
.github/workflows/ci.yml
Outdated
@@ -17,7 +17,7 @@ jobs: | |||
images: goniszewski/grimoire | |||
tags: | | |||
type=raw,value=latest,enable=${{ !github.event.release.prerelease }} | |||
type=raw,value=preview,enable=${{ !github.event.release.prerelease }} | |||
type=raw,value=preview,enable=${{ github.event.release.prerelease }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are not my changes not sure why they are here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I did change the target branch to develop
, as it needs to be merged there first. Sorry for the confusion!
Co-authored-by: Robert Goniszewski <43510122+goniszewski@users.noreply.github.com>
src/routes/signup/+page.server.ts
Outdated
@@ -41,9 +43,11 @@ export const actions: Actions = { | |||
}>({ | |||
name: Joi.string().min(3).max(31).optional(), | |||
username: Joi.string().min(3).max(31), | |||
email: Joi.string().email().optional(), | |||
email: Joi.string().email().required(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.github/workflows/manual-deploy.yml
Outdated
@@ -0,0 +1,49 @@ | |||
name: manual-deploy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not my change as well
Quality Gate passedIssues Measures |
Sorry for the delay, made email optional and resolved merge conflicts. anything else you want to address? |
No problem. Glad to see you had time to address those things. Thank you for your contribution! |
* chore: release v0.4.1-hotfix.3 * fix(data-migration): early return if no categories have parents (#128) Signed-off-by: Robert Goniszewski <robertgoniszewski@outlook.com> * Closes #130 (#131) Signed-off-by: Robert Goniszewski <robertgoniszewski@outlook.com> * fix(database): use dynamic path for SQLite database file Signed-off-by: Robert Goniszewski <robertgoniszewski@outlook.com> * docs(readme): use single README file for latest/preview version Signed-off-by: Robert Goniszewski <robertgoniszewski@outlook.com> * feat(ci): add manual deployment workflow and adjust tag conditions Signed-off-by: Robert Goniszewski <robertgoniszewski@outlook.com> * refactor(workflow): simplify manual-deploy GitHub Action Signed-off-by: Robert Goniszewski <robertgoniszewski@outlook.com> * fix(metadata): handle multiple image URLs in mainImageUrl field Signed-off-by: Robert Goniszewski <robertgoniszewski@outlook.com> * fix: auth error handling (#144) * refactor(api): migrate Swagger UI to external documentation and enhance health endpoint Signed-off-by: Robert Goniszewski <robertgoniszewski@outlook.com> * chore: release v0.4.3 --------- Signed-off-by: Robert Goniszewski <robertgoniszewski@outlook.com> Co-authored-by: Prabhanjan <zetabytes.pp@gmail.com>
Error handling on signup page. haven't checked login yet.