Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the token provided in the settings for frontend issued requests #155

Open
jtpio opened this issue Apr 30, 2024 · 0 comments
Open

Use the token provided in the settings for frontend issued requests #155

jtpio opened this issue Apr 30, 2024 · 0 comments

Comments

@jtpio
Copy link
Member

jtpio commented Apr 30, 2024

Problem

Currently, if the frontend part of the jupyterlab-github extension is used only (like in JupyterLite), the token provided via the settings does not seem to be taken into account.

This is likely because the token is appended to the URL only if the proxy (server extension) is used, and the real GitHub request made from the server extension:

if (result === true) {
requestUrl = URLExt.join(this._serverSettings.baseUrl, 'github');
// add the access token if defined
if (this.accessToken) {
params['access_token'] = this.accessToken;
}
} else {
requestUrl = DEFAULT_GITHUB_API_URL;
}

In the following screencast we see there is no information about the provided token in the requests to the GitHub API:

jupyterlab-github-request-notoken.webm

Proposed Solution

It would be useful to allow for using the token also for requests made from the JupyterLab UI directly, in scenarios where the server extension is not installed.

Additional context

This can be tested using a JupyterLite deployment with jupyterlab-github installed, for example: https://jupyterlite.readthedocs.io/en/stable/_static/lab/index.html

cc @rpwagner since we were looking into this in-person yesterday at the Jupyter Open Studio Day in NYC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant