0.1.5 • Published 2 years ago
directus-extension-ikoddi-auth v0.1.5
directus-extension-ikoddi-auth
Ikoddi authentication with directus
How to install
Clone ikoddi-auth project as
directus-extension-ikoddi-authfoldergit clone https://github.com/ibrahimbako/ikoddi-auth.git directus-extension-ikoddi-authInstall dependencies and build project
npm i npm run buildAdd env variables
IKODDI_AUTH_API_URL: "..." IKODDI_AUTH_API_KEY: "..." IKODDI_AUTH_GROUP_ID: "..." IKODDI_AUTH_OTP_APP_ID: "..."Add
phone_numberfield todirectus_usercollectionRestart directus
Usage
<phone-number> must be a valid phone number with country code
Send OTP
POST http://directus-base_url.com/smsotp/send-otp
data {
"phone_number": "<phone-number>"
}
result {
"verification_key": "<verification-key>"
}Verify OTP and Login
POST http://directus-base_url.com/smsotp/verify
data {
"phone_number": "<phone-number>",
"otp_code": "<otp-code>",
"verification_key": "<verification-key>"
}
result {
"access_token": "<access-token>",
"refresh_token": "<refresh-token>",
"expires": <number>,
"id": "<user-id>"
}Contribute
Since I don't know all of the typing systems out there, I would greatly appreciate if you would let me know how types for a language you know should look like, or even implement the generation of types for that language yourself.
If you find an error or think somthing in the process of generating types for the current languages is done in a dumb way, feel free to also open an issue.