Closed Viterbo closed 8 months ago
I just created two more auxiliary functions to store and recover account names created for each Google user.
My problem is that the table I'm using for storing this information is not defined in the database. I need someone to create that table with the corresponding indexes.
I defined the variable googleUsersTableName
in the ecosystem.config.js file with the following names:
const envDev = {
// ...
googleUsersTableName: 'dev-google-users-accounts',
};
const envProd = {
// ...
googleUsersTableName: 'prod-google-users-accounts',
}
The fields of the tables are:
Fixes #106
Description
This PR incorporates a new endpoint called
accounts/create4google
that receives the public keys (owner and active) and the JWT obtained from authenticating the user. With this info, the endpoint checks the JWT to avoid attacks and abuses and then creates a random account for that userThis endpoint also receives an optional suggested name to try first. If that name is not provided or is already used, the endpoint will create a random account.