mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
AuthN: Fix render auth when clientTokenRotation is enabled (#68709)
Add isRenderRequest check to scheduleTokenRotationJob
This commit is contained in:
parent
df4db412cb
commit
74fd874365
@ -202,8 +202,10 @@ export class ContextSrv {
|
||||
|
||||
// schedules a job to perform token ration in the background
|
||||
private scheduleTokenRotationJob() {
|
||||
// only schedule job if feature toggle is enabled and user is signed in
|
||||
if (config.featureToggles.clientTokenRotation && this.isSignedIn) {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const isRenderRequest = !!urlParams.get('render');
|
||||
// only schedule job if feature toggle is enabled, user is signed in and it's not a render request
|
||||
if (config.featureToggles.clientTokenRotation && this.isSignedIn && !isRenderRequest) {
|
||||
// get the time token is going to expire
|
||||
let expires = this.getSessionExpiry();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user