mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Withdrew the check on the sessionId when is authorized is called.
This commit is contained in:
parent
8a61f73c56
commit
e8b9765a34
@ -14,13 +14,13 @@ const isAuthorized: AuthChecker<any> = async (
|
||||
if (context.token) {
|
||||
const decoded = decode(context.token)
|
||||
// if (decoded.sessionId && decoded.sessionId !== 0) {
|
||||
// const result = await apiGet(
|
||||
// `${CONFIG.LOGIN_API_URL}checkSessionState?session_id=${decoded.sessionId}`,
|
||||
// )
|
||||
// context.sessionId = decoded.sessionId
|
||||
context.pubKey = decoded.pubKey
|
||||
context.setHeaders.push({ key: 'token', value: encode(decoded.pubKey) })
|
||||
return true
|
||||
// const result = await apiGet(
|
||||
// `${CONFIG.LOGIN_API_URL}checkSessionState?session_id=${decoded.sessionId}`,
|
||||
// )
|
||||
// context.sessionId = decoded.sessionId
|
||||
context.pubKey = decoded.pubKey
|
||||
context.setHeaders.push({ key: 'token', value: encode(decoded.pubKey) })
|
||||
return true
|
||||
// }
|
||||
}
|
||||
throw new Error('401 Unauthorized')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user