mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-09 03:04:08 -04:00
Update oidc to return refresh token in response body for mobile
This commit is contained in:
parent
97afd22f81
commit
d9cfcc86e7
@ -399,10 +399,11 @@ class Auth {
|
|||||||
*/
|
*/
|
||||||
async handleLoginSuccessBasedOnCookie(req, res) {
|
async handleLoginSuccessBasedOnCookie(req, res) {
|
||||||
// Handle token generation and get userResponse object
|
// Handle token generation and get userResponse object
|
||||||
// TODO: where to check if refresh tokens should be returned?
|
// For API based auth (e.g. mobile), we will return the refresh token in the response
|
||||||
const userResponse = await this.handleLoginSuccess(req, res, false)
|
const isApiBased = this.isAuthMethodAPIBased(req.cookies.auth_method)
|
||||||
|
const userResponse = await this.handleLoginSuccess(req, res, isApiBased)
|
||||||
|
|
||||||
if (this.isAuthMethodAPIBased(req.cookies.auth_method)) {
|
if (isApiBased) {
|
||||||
// REST request - send data
|
// REST request - send data
|
||||||
res.json(userResponse)
|
res.json(userResponse)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user