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

Added simple TOTP Two Factor Authentication #363

Merged
merged 12 commits into from
Sep 12, 2021
Merged

Conversation

Ponkhy
Copy link
Contributor

@Ponkhy Ponkhy commented Sep 9, 2021

I added a simple TOTP Two Factor Authentication.
Tested it with Google Authenticator, Authy, Bitwarden.
I also tried to use npm packages with zero or just a few dependencies to keep it small as possible.
It's build in the way that every user can enable or disable it by themselves.

I didn't chanage the database version yet, so keep that in mind in case you want to test it.
Suggestions and corrections are welcome as usual ^^

Here a few screenshots:
2FADisabled
2FAEnabled
Setup1
Setup2
Login

@louislam louislam added this to the 1.7.0 milestone Sep 10, 2021
@louislam
Copy link
Owner

Awesome! I always thought implementing 2FA need 3rd party services. Turn out it is not required.

db/patch12.sql Outdated Show resolved Hide resolved
Copy link
Contributor

@Saibamen Saibamen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some grammar

server/server.js Outdated Show resolved Hide resolved
server/server.js Outdated Show resolved Hide resolved
src/languages/en.js Outdated Show resolved Hide resolved
Ponkhy and others added 6 commits September 11, 2021 14:34
Co-authored-by: Adam Stachowicz <saibamenppl@gmail.com>
Co-authored-by: Adam Stachowicz <saibamenppl@gmail.com>
Co-authored-by: Adam Stachowicz <saibamenppl@gmail.com>
@louislam
Copy link
Owner

I added a space in the name. Tested OK with Google Authenticator, Authy and MS Authenticator.

I just don't understand how to generate a token in Bitwarden after scanned the qr code. Could you test Bitwarden again, thanks!

@Ponkhy
Copy link
Contributor Author

Ponkhy commented Sep 12, 2021

Jup still works great with Bitwarden!
Ohh you need a Bitwarden Premium License to be able to generate a 2FA token.

Unfortunatly when i click on the "2FA Settings" button i get this error and can't open them, can't figure out why it's the case.
It only appears when i access Uptime Kuma on port 3001, but when i also start the frontend as dev port 3000 it works fine.
Error

@Saibamen
Copy link
Contributor

Saibamen commented Sep 12, 2021

@Ponkhy: 3001 is server. 3000 is frontend

You see some front app in 3001, because of npm run build (could be outdated). You should use only 3000

NOTE: Make sure you have the latest patch release (z in x.y.z) of NPM packages. Delete node_modules folder and run npm install

@Ponkhy
Copy link
Contributor Author

Ponkhy commented Sep 12, 2021

Ohh ahah, yea i forgot that the server prolly still used the build version without the TwoFADialog.vue, Thank you ^^°

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

Successfully merging this pull request may close these issues.

3 participants