Dedicated Route for Email Verify #7

Closed
opened 2024-03-18 23:23:59 +00:00 by pcfreak30 · 5 comments
Owner

Need a dedicated route at /verify-email to be able to call the portal api and either use the notification system or a success screen (or error?).

Verification code should be prompted in a form if not provided in the uri.

Need a dedicated route at `/verify-email` to be able to call the portal api and either use the notification system or a success screen (or error?). Verification code should be prompted in a form if not provided in the uri.
pcfreak30 added the
ui
label 2024-03-18 23:23:59 +00:00
ditorodev was assigned by pcfreak30 2024-03-18 23:23:59 +00:00
pcfreak30 added this to the Portal project 2024-03-18 23:25:26 +00:00
Collaborator

Whats this route for? Not sure what I should add on it @pcfreak30

Whats this route for? Not sure what I should add on it @pcfreak30
Author
Owner

Whats this route for? Not sure what I should add on it @pcfreak30

@ditorodev This is for verifying your account, like a standard email activation. it creates a verification token based on:

func GenerateSecurityToken() string {
	const charset = "abcdefghijklmnopqrstuvwxyz0123456789"
	b := make([]byte, 6)
	_, err := rand.Read(b)
	if err != nil {
		panic(err)
	}
	for i := 0; i < 6; i++ {
		b[i] = charset[b[i]%byte(len(charset))]
	}
	return string(b)
}

Will be able to put a link in the email template, etc.

> Whats this route for? Not sure what I should add on it @pcfreak30 @ditorodev This is for verifying your account, like a standard email activation. it creates a verification token based on: ``` func GenerateSecurityToken() string { const charset = "abcdefghijklmnopqrstuvwxyz0123456789" b := make([]byte, 6) _, err := rand.Read(b) if err != nil { panic(err) } for i := 0; i < 6; i++ { b[i] = charset[b[i]%byte(len(charset))] } return string(b) } ``` Will be able to put a link in the email template, etc.
pcfreak30 added this to the Q1 milestone 2024-03-22 15:40:26 +00:00
Collaborator

The usual stuff products do here is to have and endpoint that autovalidates, basically a magic link, once the user signs-up they trigger the validate-email and show a constant banner thats always there until the user goes to their email and click the link, once the link is clicked it is just a session url which validates the email on the backend and redirects to the frontend. i dont see a need to make a view for this, this could be a notification alone which we could trigger thru a custom header

The usual stuff products do here is to have and endpoint that autovalidates, basically a magic link, once the user signs-up they trigger the validate-email and show a constant banner thats always there until the user goes to their email and click the link, once the link is clicked it is just a session url which validates the email on the backend and redirects to the frontend. i dont see a need to make a view for this, this could be a notification alone which we could trigger thru a custom header
Author
Owner

Per discord, this should be a banner that can resend a verification email.

The magic link sent should go to a dedicated route to call the API. it will be auth protected, so, a redirect would need the to query arg to take them back after login (most of this should be in place?).

Per discord, this should be a banner that can resend a verification email. The magic link sent should go to a dedicated route to call the API. it will be auth protected, so, a redirect would need the to query arg to take them back after login (most of this should be in place?).
Collaborator

Done. Use like /verify?token=<token_here>

Done. Use like `/verify?token=<token_here>`
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: LumeWeb/portal-dashboard#7
No description provided.