graasp / graasp/graasp-api

[Improvement] Reduce friction when user registers from an invitation

Open
#1,323 0 comments 0 reactions 0 assignees View on GitHub
improvement
Dominant language
TypeScript
Stars
7
Forks
5
PR merge metrics
No merged PRs in 30d

Description

When a user receives an invitation email, the flow the following:

```mermaid
sequenceDiagram
actor Alice
Alice->>+Server: Invite Bob as reader
actor Bob
Server-)-Bob: Send invitation link by email

Bob->>+Server: Use invitation link to create an account
Server--)-Bob: Send login link by email

Bob->>Server: Use login link
Server-->>Bob: Deliver cookie

Bob->>Client: Access item
```

To resume:
1. User clicks on the link in the email which brings him to the auth page
2. Email is pre-filled, so user only has to enter the email
3. User submits the form, server sends an email with the login link
4. User uses the login link to receive the cookie and access the application

In this flow, the user has to make a back and forth with their email client to access the application. This back and forth adds friction for the user.

We should be able to deliver the cookie when the user submits the registration form since they accessed the form from their email.

Ideally we could:
```mermaid
sequenceDiagram
actor Alice
Alice->>+Server: Invite Bob as reader
actor Bob
Server-)-Bob: Send invitation link by email with a token

Bob->>+Server: Use invitation link to create an account
Server-->>Bob: Deliver cookie

Bob->>Client: Access item
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.