Ejemplo n.º 1
0
@extends('layouts.app')

@section('content')
<div class="container">
    <div class="row">
        <div class="col-md-8 col-md-offset-2">
            <div class="panel panel-default">
                <div class="panel-heading">Configuring One-Time password</div>
                <div class="panel-body">
                    <form class="form-horizontal" role="form" method="POST" action="{{ url('/auth/totp') }}">
                        {{ csrf_field() }}

                        <?php 
$google2fa_url = Google2FA::getQRCodeGoogleUrl(env('APP_URL', 'MidasMarket'), Auth::user()->email, $secret);
?>

                        <div class="alert alert-info">
                          <p>1. Scan this QR code or enter secret key with your 2FA app(Google Authenticator, Authy, etc..)</p>
                        </div>

                        <div class="form-group">
                            <label for="totp" class="col-md-4 control-label">Your secret key</label>

                            <div class="col-md-6">
                                <input id="secret" readonly type="text" class="form-control" name="secret" value="{{$secret}}">
                            </div>
                        </div>

                        <p class="alert text-center"><img src="{{$google2fa_url}}"></p>

                        <p class="alert alert-info">2. Input one-time password</p>
Ejemplo n.º 2
0
    @include('bitaac::partials.heading', ['title' => 'Account', 'desc' => 'View and edit your account.'])

    <form method="POST">
        {!! csrf_field() !!}

        <table>
            <tr class="header">
                <th colspan="4" align="center">Two-Factor Authentication</th>
            </tr>

            <tr>
                <td align="center"> 
                    <div class="visible-print text-center">
                        <?php 
$secret = $account->secret ? $account->secret : Google2FA::generateSecretKey();
$google2fa_url = Google2FA::getQRCodeGoogleUrl('bitaac', $account->name, $account->bit->secret);
?>

                        <img src="{{ $google2fa_url }}">

                        <div>
                            <li>Scan the QR code above with <b>Google Authenticator</b> or <b>Authy</b>.</li>
                            <li>Write the generated token into the field below and press enable/disable.</li>
                        </div>
                    </div>
                </td>
            </tr>

            <tr>
                <td align="center">
                    Token: <input type="text" name="secret">