Crates.io | otpless_auth |
lib.rs | otpless_auth |
version | 0.1.2 |
source | src |
created_at | 2023-11-01 10:49:01.074014 |
updated_at | 2023-11-01 11:35:00.793986 |
description | to authenticate otpless jwt token for otpless user detail |
homepage | |
repository | https://github.com/otpless-tech/otpless_auth |
max_upload_size | |
id | 1020847 |
size | 10,233 |
Add the following to Cargo.toml:
otpless_auth = "0.1.2"
Import the get_otpless_user
function
extern crate otpless_auth;
use otpless_auth::api::otpless::get_otpless_user;
pub fn get_otpless_user(jwt_token: &str, client_id: &str) -> Result<OtplessUserDetail, OtplessError>
Params | Data type | Mandatory | Constraints | Remarks |
---|---|---|---|---|
jwt_token | String | true | token which you get from OTPLess |
|
client_id | String | true | Your OTPLess Client Id |
Return: Object Name: Result<OtplessUserDetail, OtplessError>
auth_time
(Long, required): The time when authentication was completed.
phone_number
(String, required): The user's phone number.
country_code
(String, required): The country code of user's phone number.
national_phone_number
(String, required): The user's phone number without country code.
email
(String, required): The user's email address.
name
(String, required): The user's full name.
message
(String): The message contains error information.
jwt_error
(Some