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

fix: auth error handling #144

Merged

Conversation

Sparkenstein
Copy link
Contributor

Error handling on signup page. haven't checked login yet.

image

image

image

Grazerquart and others added 4 commits September 27, 2024 22:17
* 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>
@Sparkenstein
Copy link
Contributor Author

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
Copy link
Contributor Author

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

Copy link
Owner

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);
Copy link
Contributor Author

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.

  1. Why random wait?
  2. The function is already async it will always return a promise, returning new Promise(....) just adds a bit more work for compiler.

Copy link
Owner

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 :)

Copy link
Owner

@goniszewski goniszewski left a 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
Copy link
Owner

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!

CONTRIBUTING.md Outdated Show resolved Hide resolved
@@ -16,17 +17,10 @@ export const actions: Actions = {
const existingUser = await getUserWithoutSerialization(login);

if (!existingUser) {
const randomMs = Math.floor(Math.random() * 1000);
Copy link
Owner

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 :)

@@ -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(),
Copy link
Owner

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's mandatory on UI tho. So we either make it optional on UI or mandatory here. whichever you prefer. I think optional makes sense because we already have username. But in future if we introduce notification feature then we are gonna need email.

image

Copy link
Owner

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.

@goniszewski goniszewski changed the base branch from main to develop October 25, 2024 17:16
@goniszewski goniszewski added bug Something isn't working documentation Improvements or additions to documentation labels Oct 25, 2024
@@ -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 }}
Copy link
Contributor Author

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

Copy link
Owner

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>
@@ -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(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's mandatory on UI tho. So we either make it optional on UI or mandatory here. whichever you prefer. I think optional makes sense because we already have username. But in future if we introduce notification feature then we are gonna need email.

image

@@ -0,0 +1,49 @@
name: manual-deploy
Copy link
Contributor Author

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

Copy link

sonarcloud bot commented Oct 31, 2024

@Sparkenstein
Copy link
Contributor Author

Sorry for the delay, made email optional and resolved merge conflicts. anything else you want to address?

@goniszewski
Copy link
Owner

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!

@goniszewski goniszewski merged commit 6eac509 into goniszewski:develop Oct 31, 2024
1 check passed
goniszewski added a commit that referenced this pull request Nov 6, 2024
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants