With this POC we intend to take the first steps to solve the UX problem of having multiple authentication endpoints with a unified frontend.
Required software:
The POC consists of an instance of nocodb
with a single table:
id | uri |
---|---|
10101010A | https://example.com |
The NocoDB exposes a REST API that could be consumed in order to:
curl -X 'POST' \
'https://api.coopdevs.org/api/v1/db/data/v1/POC/KCUR' \
-H 'accept: application/json' \
-H 'xc-auth: <token>' \
-H 'Content-Type: application/json' \
-d '{
"uri": "https://www.casareal.es",
"id": "00000010A"
}'
{"uri":"https://www.casareal.es","id":"00000010A"}
curl -X 'GET' \
'https://api.coopdevs.org/api/v1/db/data/v1/POC/KCUR/find-one?fields=uri&where=%28id%2Ceq%2C10101010A%29' \
-H 'accept: application/json' \
-H 'xc-auth: <token>'
{"uri":"https://example.com"}
This API can be called from the frontend, once it has the user’s unique identifier, to know which page to redirect the user to in order to complete the authentication.
At the same time, new registrations in the system can also be introduced automatically through the use of the REST API.