This repository was archived by the owner on May 5, 2025. It is now read-only.
This repository was archived by the owner on May 5, 2025. It is now read-only.
Refresh incorrectly attempted when both static access_token and developer_token are present #147
Closed
Description
Describe the bug
When both a static access_token
and developer_token
are present, a refresh()
is incorrectly triggered when the access_token
expires.
Expected behavior
Defining a static access_token
should take precedence over a developer_token
and suppress auto_refresh
behavior.
Current behavior
When both a static access_token
and developer_token
are present, a refresh()
is incorrectly triggered when the access_token
expires.
Possible solution
The general approach would be to add a check for existence of a static access_token
if a developer_token
is present. If the access_token
exists, the refresh()
should be bypassed. The result should then be a 401
authentication error.
Steps to reproduce
- Export both a
PAN_DEVELOPER_TOKEN
andPAN_ACCESS_TOKEN
- Wait for the
access_token
to expire. - Attempt a
refresh()
and observe the refresh attempt.
Screenshots
Context
Your Environment
- Version used: alpha8
- Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3):
- Operating System and version (desktop or mobile):
- Link to your project: