Passwordless (#292)

* add two rpcs to User service:
	- Passwordless: endpoint that receives an email, topic and an optional message
	- PasswordlessML: endpoint that receives token and topic via MagicLink.

* Proposal to add Passwordless login feature to the endpoint user.

* remove currency run check

* Commit from GitHub Actions (Publish APIs & Clients)

* Create downstream.yml

* Commit from GitHub Actions (Publish APIs & Clients)

* update todo

* Commit from GitHub Actions (Publish APIs & Clients)

* Update publish.yml

* Commit from GitHub Actions (Publish APIs & Clients)

* Update publish.yml

* Commit from GitHub Actions (Publish APIs & Clients)

* Update and rename publish.yml to generate.yml

* Update generate.yml

* Commit from GitHub Actions (Generate Clients & Examples)

* Commit from GitHub Actions (Generate Clients & Examples)

* add comments

* Commit from GitHub Actions (Generate Clients & Examples)

* move otp to auth category

* charge for user verification

* Commit from GitHub Actions (Generate Clients & Examples)

* Update user.proto

* Commit from GitHub Actions (Generate Clients & Examples)

* Commit from GitHub Actions (Generate Clients & Examples)

* Change js client git repo url (#249)

* Commit from GitHub Actions (Generate Clients & Examples)

* use tableName func for Count

* Commit from GitHub Actions (Generate Clients & Examples)

* update notes example

* Commit from GitHub Actions (Generate Clients & Examples)

* Update .gitignore

* Update .gitignore

* Commit from GitHub Actions (Generate Clients & Examples)

* add new endpoints SendMagicLink and VerifyToken to M3O user serivce

Signed-off-by: Daniel Joudat <danieljoudat@gmail.com>

* Update user.proto

* add examples to examples.json | convert isvalid to is_valid | add some extra comments in user.proto

Signed-off-by: Daniel Joudat <danieljoudat@gmail.com>

Co-authored-by: Asim Aslam <asim@aslam.me>
Co-authored-by: asim <asim@users.noreply.github.com>
Co-authored-by: Janos Dobronszki <dobronszki@gmail.com>
Co-authored-by: crufter <crufter@users.noreply.github.com>
This commit is contained in:
Daniel Joudat
2021-12-10 12:57:00 +03:00
committed by GitHub
parent f82bc634c1
commit 1d6234155a
6 changed files with 827 additions and 99 deletions

View File

@@ -18,6 +18,8 @@ service User {
rpc SendPasswordResetEmail(SendPasswordResetEmailRequest) returns (SendPasswordResetEmailResponse) {}
rpc ResetPassword(ResetPasswordRequest) returns (ResetPasswordResponse) {}
rpc List(ListRequest) returns(ListResponse) {}
rpc SendMagicLink(SendMagicLinkRequest) returns (stream SendMagicLinkResponse) {}
rpc VerifyToken(VerifyTokenRequest) returns (VerifyTokenResponse) {}
}
message Account {
@@ -237,3 +239,38 @@ message ListRequest {
message ListResponse {
repeated Account users = 1;
}
// Login using email only - Passwordless
message SendMagicLinkRequest {
// the email address of the user
string email = 1;
string subject = 2;
// Text content of the email. Don't forget to include the string '$micro_verification_link' which will be replaced by the real verification link
// HTML emails are not available currently.
string textContent = 3;
// Display name of the sender for the email. Note: the email address will still be 'support@m3o.com'
string fromName = 4;
// Your web site address, example www.example.com or user.example.com
string address = 5;
// Endpoint name where your http request handler handles MagicLink by
// calling M3O VerifyToken endpoint. You can return as a result a success,
// failed or redirect to another page.
string endpoint = 6;
}
message SendMagicLinkResponse {
Session session = 1;
}
// Check whether the token attached to MagicLink is valid or not.
// Ideally, you need to call this endpoint from your http request
// handler that handles the endpoint which is specified in the
// SendMagicLink request.
message VerifyTokenRequest {
string token = 1;
}
message VerifyTokenResponse {
bool is_valid = 1;
string message = 2;
}