Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
2fa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Moser
2fa
Merge requests
!2
Document newly added features in README
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Document newly added features in README
ducati/2fa:master
into
master
Overview
2
Commits
2
Pipelines
0
Changes
1
Merged
Sören Ducati
requested to merge
ducati/2fa:master
into
master
9 months ago
Overview
2
Commits
2
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
1d08430b
Prev
Next
Show latest version
1 file
+
5
−
7
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Verified
1d08430b
chore: improved README with functionality
· 1d08430b
Sören Ducati
authored
9 months ago
README.md
+
5
−
7
Options
@@ -20,18 +20,16 @@ Launch a Python shell, e.g., using:
```
bash
source
venv/bin/activate
python3
python3
main.py
-e
```
Within the shell, type:
This will only store the token locally in the secret storage, with minimal validation.
To facilitate scripting, you can also pass the token as a quoted (!) string to the script, i.e like that:
```
python
from
main
import
enroll_token
enroll_token
(
"
otpauth://totp/...
"
)
# replace this with the URL you've gotten from the 2FA enrollment system
```
bash
python3 main.py
-e
"otpauth://totp/..."
```
This will only store the token locally in the secret storage, without any validation whatsoever.
## Get token
```
bash
Loading