Modified the obtainAccessToken and the refreshAccessToken functions to avoid returning multiple response with the res object
Modified the getRolesAndPermission function to no longer modify the response object
Note: in a Soul-CLI instance with auth tables that have been created/maintained using Soul the data inconsistency that this PR resolves would not be an issue. It can only be an issue when Soul-Auth is being added to an existing Soul database.
Testing Results
Previously, when a user without a role attempted to login, Soul was returning a Success message to the client. However, it has been modified to return the following error message instead:
Fixes #182
Modifications
obtainAccessToken
and therefreshAccessToken
functions to avoid returning multiple response with theres
objectgetRolesAndPermission
function to no longer modify the response objectNote: in a Soul-CLI instance with auth tables that have been created/maintained using Soul the data inconsistency that this PR resolves would not be an issue. It can only be an issue when Soul-Auth is being added to an existing Soul database.
Testing Results
Previously, when a user without a role attempted to login, Soul was returning a Success message to the client. However, it has been modified to return the following error message instead: