Skip to content

How to put the password in the request url? #1285

Closed

Description

@ladyrick

For example, can I use http://127.0.0.1:8080/?password=balabala to login instead of input the password manually?

Jupyter notebook does it well: http://127.0.0.1:8080/?token=balabala

Activity

  1. sr229 commented on Jan 20, 2020

    @sr229
    Contributor

    We set the authentication via Set-Cookie. there's a value in there called key=. That's how we set your password in there. Look in your network requests under /login.

  2. ladyrick commented on Jan 20, 2020

    @ladyrick
    Author

    But set-cookie is not so convenient for user to open it directly.

  3. ladyrick commented on Jan 20, 2020

    @ladyrick
    Author

    We set the authentication via Set-Cookie. there's a value in there called key=. That's how we set your password in there. Look in your network requests under /login.

    I type the vscode-server url in address bar and open it.
    After input the password, I can get access to it.

    Then every time I open the url, password is not asked.

    But, when I put the vscode-server url in a button
    <a href="http://10.20.30.40:9900" target="_blank">code-server</a>
    and click it to open vscode-server, the password is always required.

    Why is that?

  4. ladyrick commented on Jan 20, 2020

    @ladyrick
    Author

    We set the authentication via Set-Cookie. there's a value in there called key=. That's how we set your password in there. Look in your network requests under /login.

    I type the vscode-server url in address bar and open it.
    After input the password, I can get access to it.

    Then every time I open the url, password is not asked.

    But, when I put the vscode-server url in a button
    <a href="http://10.20.30.40:9900" target="_blank">code-server</a>
    and click it to open vscode-server, the password is always required.

    Why is that?

    Solved.
    It is because SameSite=strict

  5. augustin64 commented on Oct 11, 2022

    @augustin64

    As this issue was important for me to be able connect to remote servers using an electron app serving just an URL, I made a workaround, which is made for nginx but could be used with any other reverse proxy I think.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions