Skip to content

Commit 9a1428f

Browse files
committed
MsGraphAdmin::connect redirects by default add false to disable redirecting
1 parent 18bfd62 commit 9a1428f

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/MsGraphAdmin.php

+1-10
Original file line numberDiff line numberDiff line change
@@ -111,22 +111,13 @@ public function getAccessToken($returnNullNoAccessToken = false, $redirect = fal
111111
return null;
112112
}
113113

114-
if ($redirect) {
115-
return $this->connect($redirect);
116-
}
117-
118-
return $this->connect($redirect)->access_token;
114+
return $this->connect($redirect);
119115
}
120116

121117
$now = now()->addMinutes(5);
122118

123119
if ($token->expires < $now) {
124-
if ($redirect) {
125-
return $this->connect($redirect);
126-
}
127-
128120
return $this->connect($redirect);
129-
130121
} else {
131122

132123
// Token is still valid, just return it

0 commit comments

Comments
 (0)