Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/SoFriendly/2fhey
https://github.com/SoFriendly/2fhey
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/SoFriendly/2fhey
- Owner: SoFriendly
- License: cc0-1.0
- Created: 2022-04-28T21:52:29.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-01T14:11:48.000Z (3 months ago)
- Last Synced: 2024-11-01T15:20:21.780Z (3 months ago)
- Language: Swift
- Size: 4.22 MB
- Stars: 120
- Watchers: 7
- Forks: 26
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-macOS - 2FHey - iMessage AutoFill For Any Browser. Auto-copy 2FA & OTP codes into Firefox & Google Chrome (Uncategorized / Uncategorized)
README
## Adding Custom Patterns
If a code for a service you use isn't automatically detected with the built-in pattern matchers, you can create a PR to add a custom pattern. In `AppConfig.json`, there is a key called `customPatterns`. A `customPatterns` object must be in the format:
```
{
"serviceName": "the name of the service that uses this format",
"matcherPattern": "a regex pattern to determine if a text belongs to this service",
"codeExtractorPattern": "a regex pattern used to match the OTP code from a message"
}
```For example, if a service sent a text that looked like:
```
someweird-pattern:a1b2c3
```where `a1b2c3` is the code we want to be parsed, we could an entry that looks like:
```
{
"serviceName": "some service",
"matcherPattern": "^someweird-.+$",
"codeExtractorPattern": "^someweird.+:((\\d|\\D){4,6})$"
}
```