diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 4c0358ce..8ba498c4 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -4,9 +4,11 @@ # Rules -- Use ESLint -- Use Prettier -- Use snake_case +1. Use ESLint. +1. Use Prettier. +1. Use snake_case. +1. Try not use new modules modules. +1. Make your PR to the dev branch. # Summary diff --git a/.github/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md similarity index 59% rename from .github/bug_report.md rename to .github/ISSUE_TEMPLATE/bug_report.md index d9183634..4f552c8a 100644 --- a/.github/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,25 +1,28 @@ --- -name: Bug Report -about: Use this template for reporting a bug -labels: "Type: Bug" +name: Bug report +about: Use this template for reporting a bug. +title: '' +labels: 'Type: Bug' +assignees: Levminer + --- -**Describe the bug** +**Describe the bug:** - A clear and concise description of what the bug is. -**To Reproduce** +**To Reproduce:** - Steps to reproduce the behavior (Detailed steps): -**Expected behavior** +**Expected behavior:** - A clear and concise description of what you expected to happen. -**Version Info** +**Version Info:** - Paste version informations here (Top menu > Info > About > Copy): -**Additional context** +**Additional context:** - Add any other context about the problem here. diff --git a/.github/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md similarity index 59% rename from .github/feature_request.md rename to .github/ISSUE_TEMPLATE/feature_request.md index 3f6a0702..e1b6b82e 100644 --- a/.github/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,21 +1,24 @@ --- -name: Feature Request +name: Feature request about: Use this template for creating a feature request -labels: "Type: Feature" +title: '' +labels: 'Type: Feature' +assignees: Levminer + --- -**Is your feature request related to a problem? Please describe.** +**Is your feature request related to a problem? Please describe:** - A clear and concise description of what the problem is. -**Describe the solution you'd like** +**Describe the solution you'd like:** - A clear and concise description of what you want to happen. -**Describe alternatives you've considered** +**Describe alternatives you've considered:** - A clear and concise description of any alternative solutions or features you've considered. -**Additional context** +**Additional context:** - Add any other context or screenshots about the feature request here. diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 00000000..7eb44b2d --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,21 @@ +# Security Policy + +- This is Authme's security policy. + +## Supported Versions + +- There are the currently supported versions: + +| Version | Supported | +| ------- | ------------------ | +| 1.x.x | :x: | +| 2.x.x | :white_check_mark: | + +## Reporting a Vulnerability + +- Please report security vulnerabilitys thru email at: + +## Release cycle + +- Standard updates: Coming on Tuesdays if everything is going well. +- Hotfix updates or Security updates: On Tuesdays, Thursdays or Saturdays if there is a problem that can not wait until the next Tuesday. diff --git a/.github/costum.md b/.github/costum.md deleted file mode 100644 index 4907ab78..00000000 --- a/.github/costum.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -name: Other -about: Use this template for creating other issues -labels: "" ---- - diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..58449d2f --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,56 @@ +name: "CodeQL" + +on: + push: + branches: [main, dev] + pull_request: + # The branches below must be a subset of the branches above + branches: [main, dev] + schedule: + - cron: "43 17 * * 4" + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + language: ["javascript"] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/README.md b/README.md index aa3dba1b..570f449c 100644 --- a/README.md +++ b/README.md @@ -2,22 +2,47 @@ - Simple cross platform two-factor authentication app for desktop. -# How to use +## Authme Web Beta -- For non technical people: Instructions in the app -- For technical people: Check out this [Readme](https://github.com/Levminer/authme/blob/main/extract/README.md) +- Authme is now available as a web app in beta version. It's a PWA app to, so you can install it on your phone! +- Try it out and give feedback: [Authme Web](https://github.com/levminer/authme-web) -# Development +## How to use + +- Simple quick start guide. + +#### Getting started + +- Currently you can import codes to Authme two ways: + +1. From Google Authenticator: (Example: Import all of your saved QR codes from your Google Authenticator app.) +1. From stand alone QR codes: (Example: You screenshot all the QR codes from your favourite websites, and import all of them to Authme.) + +### How to import + +- If you are importing from Google Authenticator you have to install [Python](https://www.python.org/downloads/) + +1. For non technical people: Instructions in the app. +1. For technical people: Check out this: [Readme](https://github.com/Levminer/authme/blob/main/extract/README.md) + +## Release cycle + +- Standard updates: Coming on Tuesdays if everything is going well. +- Hotfix updates or Security updates: On Tuesdays, Thursdays or Saturdays if there is a problem that can not wait until the next Tuesday. + +## Development - Start app: `npm run start` - Build app: `npm run build` - Package app: `npm run package` - Lint app: `npm run lint` -# Contrubuting +## Contributing + +- Read: [Contributing](https://github.com/Levminer/authme/blob/main/.github/CONTRIBUTING.md) -- Read [Contributing](https://github.com/Levminer/authme/blob/main/.github/CONTRIBUTING.md) +## License -# License +- This software is licensed under: [MIT](https://github.com/Levminer/authme/blob/main/LICENSE.md) -- MIT +- If you are planning to use this software as a business please contact me at: diff --git a/app/settings/index.html b/app/settings/index.html index c6f730e0..4061916b 100644 --- a/app/settings/index.html +++ b/app/settings/index.html @@ -17,13 +17,9 @@

Authme

Settings

You can configure the app setting here.

-

Status

-

All systems online.

- -

Launch on startup

Start the app after the operating system loaded. The app will start on the tray (Windows only).

- +

Close app to tray

On closing the app will not quit. You can open the app from the tray menu (Windows only).

@@ -43,7 +39,13 @@

Open folders

Clear data

Clear password, 2FA codes and other settings

-

+

Status

+

Current status of the API, click for all the status informations.

+ +
+

Version

+

Your current Authme version, click for release notes.

+ diff --git a/app/settings/src/css/index.css b/app/settings/src/css/index.css index 2004ffa7..17138065 100644 --- a/app/settings/src/css/index.css +++ b/app/settings/src/css/index.css @@ -6,7 +6,7 @@ body { .center { top: -50px; width: 1000px; - height: 1700px; + height: 1850px; } .button1 { @@ -47,19 +47,9 @@ body { top: 45px; } -#version { - position: relative; - top: 30px; -} - .link1 { font-size: 1rem !important; position: relative; top: 50px; color: white !important; } - -#status { - font-size: 28px; - font-weight: bold; -} diff --git a/app/settings/src/js/index.js b/app/settings/src/js/index.js index 1cf8d7fc..4ebd1a9a 100644 --- a/app/settings/src/js/index.js +++ b/app/settings/src/js/index.js @@ -7,7 +7,7 @@ const fetch = require("node-fetch") const version = ipc.sendSync("ver") -document.querySelector("#ver").textContent = `Authme ${version}` +document.querySelector("#but7").textContent = `Authme ${version}` let folder @@ -193,7 +193,7 @@ const folder1 = () => { } // ? Status API -const status = document.querySelector("#status") +const status = document.querySelector("#but6") const api = async () => { try { @@ -202,10 +202,9 @@ const api = async () => { .then((data) => { try { if (data.state === "up") { - status.style.color = "green" + status.textContent = "All systems online" } else { status.textContent = "Some systems offline" - status.style.color = "red" } } catch (error) { return console.log(error) @@ -213,17 +212,21 @@ const api = async () => { }) } catch (error) { status.textContent = "Can't connect to API" - status.style.color = "red" } } api() // ? Open Status -const page = () => { +const link0 = () => { shell.openExternal("https://status.levminer.com") } +// ? Open Releases +const link1 = () => { + shell.openExternal("https://github.com/Levminer/authme/releases") +} + const hide = () => { ipc.send("hide0") } diff --git a/main.js b/main.js index e61ae7a7..15efeedf 100644 --- a/main.js +++ b/main.js @@ -29,8 +29,8 @@ let ipc_to_application_1 = false let confirmed = false let startup = false -const authme_version = "2.1.1" -const tag_name = "2.1.1" +const authme_version = "2.1.2" +const tag_name = "2.1.2" ipc.on("ver", (event, data) => { event.returnValue = authme_version diff --git a/package-lock.json b/package-lock.json index 15fe8b8f..6faa76ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -554,9 +554,9 @@ } }, "@levminer/speakeasy": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@levminer/speakeasy/-/speakeasy-1.0.3.tgz", - "integrity": "sha512-baKe9Sq1MTyRjRnyvZsCHNl+w3TRc1qv85EZZOlV/FdXHUrQF2Z3MMVtnChMe1osITsFREb7LcZkIpaGsj+m3g==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@levminer/speakeasy/-/speakeasy-1.0.5.tgz", + "integrity": "sha512-ml2JEyeeCC8LFsEm5KLA/1R02BmldHtWcdMDa4HC+YFt9aidBxexixZE6jAnqrc+i52m3z7nkKRJZr/An/JJLA==", "requires": { "base32.js": "0.1.0" } @@ -2123,9 +2123,9 @@ "optional": true }, "eslint": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.15.0.tgz", - "integrity": "sha512-Vr64xFDT8w30wFll643e7cGrIkPEU50yIiI36OdSIDoSGguIeaLzBo0vpGvzo9RECUqq7htURfwEtKqwytkqzA==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.16.0.tgz", + "integrity": "sha512-iVWPS785RuDA4dWuhhgXTNrGxHHK3a8HLSMBgbbU59ruJDubUraXN8N5rn7kb8tG6sjg74eE0RA3YWT51eusEw==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -2162,7 +2162,7 @@ "semver": "^7.2.1", "strip-ansi": "^6.0.0", "strip-json-comments": "^3.1.0", - "table": "^5.2.3", + "table": "^6.0.4", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, @@ -2173,6 +2173,53 @@ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + }, "strip-ansi": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", @@ -2187,6 +2234,26 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true + }, + "table": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.4.tgz", + "integrity": "sha512-sBT4xRLdALd+NFBvwOz8bw4b15htyythha+q+DVZqy2RS08PPC8O2sZFgJYEY7bJvbCFKccs+WIZ/cd+xxTWCw==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } } } }, @@ -2709,9 +2776,9 @@ } }, "eslint-config-prettier": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-7.0.0.tgz", - "integrity": "sha512-8Y8lGLVPPZdaNA7JXqnvETVC7IiVRgAP6afQu9gOQRn90YY3otMNh+x7Vr2vMePQntF+5erdSUBqSzCmU/AxaQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-7.1.0.tgz", + "integrity": "sha512-9sm5/PxaFG7qNJvJzTROMM1Bk1ozXVTKI0buKOyb0Bsr1hrwi0H/TzxF/COtf1uxikIK8SwhX7K6zg78jAzbeA==", "dev": true }, "eslint-config-promise": { diff --git a/package.json b/package.json index e097911f..0658beaf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "authme", - "version": "2.1.1", + "version": "2.1.2", "description": "A simple 2FA app for desktop built with Electron and Node.js.", "main": "main.js", "scripts": { @@ -45,9 +45,9 @@ "electron": "^11.1.0", "electron-builder": "^22.9.1", "electron-packager": "^15.2.0", - "eslint": "^7.15.0", + "eslint": "^7.16.0", "eslint-config-node": "^4.1.0", - "eslint-config-prettier": "^7.0.0", + "eslint-config-prettier": "^7.1.0", "eslint-config-promise": "^2.0.2", "eslint-config-standard": "^16.0.2", "eslint-plugin-node": "^11.1.0", @@ -57,7 +57,7 @@ "prettier": "^2.2.1" }, "dependencies": { - "@levminer/speakeasy": "^1.0.3", + "@levminer/speakeasy": "^1.0.5", "bcryptjs": "^2.4.3", "create-desktop-shortcuts": "^1.2.0", "cryptr": "^6.0.2",