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

Onboarding flow for self-hosting-agent #5

Open
anandology opened this issue Oct 18, 2022 · 1 comment
Open

Onboarding flow for self-hosting-agent #5

anandology opened this issue Oct 18, 2022 · 1 comment

Comments

@anandology
Copy link
Member

anandology commented Oct 18, 2022

When a new user starts with a new digital ocean droplet, the following are the steps that she need to do to get started with the learning journey.

Step 1: install agent

$ curl https://self-hosting-101.pipal.in/install.sh | sudo bash -

Step 2: run setup

$ self-hosting-agent connect
Passcode: xxxx

Option 1: Enter-email/username etc.

Option 2: Please open the following URL in your browser to connect this node with your account.

https://self-hosting-101.pipal.in/connect/abcd12345678

??
@nikochiko
Copy link
Contributor

Authentication is implemented.

With the /connect endpoint, I think this would be the simplest solution:

Send IP address with /connect/{ip_address}, maybe after encoding it as base64. Then server will store this as a session cookie until user authenticates when it can be retrieved and stored in the table.

I considered passcode authentication, but there would have to be multiple HTTP requests (before to store the IP-address, and link it with the passcode), and then for authentication. I feel the sending IP address in the URL would be the simplest solution.

We should also have a self-hosting-agent check to see if the URL is connected. It should return an output like:

This node is connected to 'nikochiko'.

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

No branches or pull requests

2 participants