Skip to content

Commit

Permalink
add support for microsoft authenticator and authy on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Pingu501 committed Mar 26, 2022
1 parent 260a98e commit 7b6c5ef
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Classes/Controller/BackendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,10 @@ public function newAction()
$currentDomain = $this->domainRepository->findOneByActiveRequest();
$currentSite = $currentDomain !== null ? $currentDomain->getSite() : $this->siteRepository->findDefault();
$currentSiteName = $currentSite->getName();
$urlEncodedSiteName = urlencode($currentSiteName);

$userIdentifier = $this->securityContext->getAccount()->getAccountIdentifier();
$oauthData = "otpauth://totp/$userIdentifier?secret=$secret&issuer=$currentSiteName";
$oauthData = "otpauth://totp/$userIdentifier?secret=$secret&period=30&issuer=$urlEncodedSiteName";
$qrCode = (new QRCode(new QROptions([
'outputType' => QRCode::OUTPUT_MARKUP_SVG
])))->render($oauthData);
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Thx to @Sebobo @Benjamin-K for creating a list of supported and testet apps!
**iOS**:
* Google Authenticator (used for development) ✅
* Authy ✅
* Microsoft Authenticator ❌
* Microsoft Authenticator ✅
* 1Password ✅

**Android**:
* Google Authenticator ✅
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ prototype(Sandstorm.NeosTwoFactorAuthentication:BodyLayout.Default) < prototype(
renderer = afx`
<main>
<Sandstorm.NeosTwoFactorAuthentication:Component.FlashMessages flashMessages={props.flashMessages}/>
<h1>{props.teaserTitle}</h1>
<legend>{props.teaserTitle}</legend>

<h3>{props.teaserText}</h3>
<p>
{props.teaserText}
</p>

{props.content}
</main>
Expand Down

0 comments on commit 7b6c5ef

Please sign in to comment.