Authentication
In bohr.io, you can configure authentication for all environments of your project and specific branches by navigating to Settings ⇾ Authentication ⇾ METHOD checkbox.
bohr.io's authentication allows you to include multiple users and passwords.
In addition to Basic Authentication, bohr.io offers OAuth integration with GitHub, which allows authentication with Google, Discord, and other providers.
To do this, you need to:
- Log in to GitHub;
- Access Settings;
- Go to Developer Settings (the last option in the left-side menu);
- Access OAuth Apps;
- Create an OAuth application (the highlighted sections represent mandatory formats; after filling in the gaps shown in the image, click on Register application);
- On the next screen, you will copy your
client
andsecret
keys. For thesecret
, you need to click on "Generate a new client secret" (tip: save the keys in a notepad because you will need them shortly - and they will become invisible from now on);
- To configure the
client
andsecret
within bohr.io, you need to log in to the platform and add a new project:
Choose a template (in this example, we will use the Portfolio Template);
Rename the subdomain and click "Publish" at the bottom of the screen.
- On the “Overview” screen, click the following icon:
when your project appears, copy the URL "teste-bohr.bohr.io" (tip: save it in a notepad because you will need this URL);
Return to the GitHub screen where you obtained the
client
andsecret
keys, and paste the URL "teste-bohr.bohr.io" into the fields Homepage URL and Authorization callback URL (don't forget to keep "bohr/signin" at the end of the URL in Authorization callback URL); then click "Update application".
- get back to the Overview screen on bohr.io and click on Settings;
- Within the Settings page, click on Authentication;
- in Method, select OAuth;
- in Provider, choose GitHub;
- enter the
client
andsecret
you saved in the notepad into their respective fields; - in Protect, select Front end and Back end;
- click Save.