mirror of
https://github.com/sasjs/server.git
synced 2026-01-04 21:30:05 +00:00
test(web): moved authorize specs from api to web
This commit is contained in:
@@ -108,6 +108,10 @@ const authorize = async (
|
||||
): Promise<AuthorizeResponse> => {
|
||||
const userId = req.session.user?.userId
|
||||
if (!userId) throw new Error('Invalid userId.')
|
||||
|
||||
const client = await Client.findOne({ clientId })
|
||||
if (!client) throw new Error('Invalid clientId.')
|
||||
|
||||
// generate authorization code against clientId
|
||||
const userInfo: InfoJWT = {
|
||||
clientId,
|
||||
|
||||
Reference in New Issue
Block a user