AUTH-3375 exchangeOrgToken deleted cookie fix
This commit is contained in:
parent
d8bee0b4d9
commit
67680f5536
|
@ -301,7 +301,9 @@ func exchangeOrgToken(appURL *url.URL, orgToken string) (string, error) {
|
||||||
resp.Body.Close()
|
resp.Body.Close()
|
||||||
var appToken string
|
var appToken string
|
||||||
for _, c := range resp.Cookies() {
|
for _, c := range resp.Cookies() {
|
||||||
if c.Name == tokenHeader {
|
//if Org token revoked on exchange, getTokensFromEdge instead
|
||||||
|
validAppToken := c.Name == tokenHeader && time.Now().Before(c.Expires)
|
||||||
|
if validAppToken {
|
||||||
appToken = c.Value
|
appToken = c.Value
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue