Skip to content

Commit

Permalink
Facebook login added
Browse files Browse the repository at this point in the history
  • Loading branch information
User authored and User committed Aug 27, 2022
1 parent 76c35d9 commit 7be6eef
Show file tree
Hide file tree
Showing 9 changed files with 163 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT_URI=http://127.0.0.1:8000/login/google/callback

FACEBOOK_CLIENT_ID=

FACEBOOK_CLIENT_SECRET=
FACEBOOK_REDIRECT_URI=http://127.0.0.1:8000/login/facebook/callback
5 changes: 5 additions & 0 deletions config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,10 @@
'client_secret' => env('GOOGLE_CLIENT_SECRET'),
'redirect' => env('GOOGLE_REDIRECT_URI')
],
'facebook' => [
'client_id' => env('FACEBOOK_CLIENT_ID'),
'client_secret' => env('FACEBOOK_CLIENT_SECRET'),
'redirect' => env('FACEBOOK_REDIRECT_URI')
],

];
1 change: 1 addition & 0 deletions resources/views/auth/login.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
</p>
<a href="{{ route('login.provider', 'github') }}" class="btn btn-outline-secondary">Github</a>
<a href="{{ route('login.provider', 'google') }}" class="btn btn-outline-danger">Google</a>
<a href="{{ route('login.provider', 'facebook') }}" class="btn btn-outline-primary">Facebook</a>
</div>
</div>
</div>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:4:{s:6:"_token";s:40:"X5LYgwTiZNJDmZL8JOCsnryFV4dJB71MPNzXur0T";s:9:"_previous";a:1:{s:3:"url";s:36:"http://localhost:8000/login/facebook";}s:6:"_flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}s:5:"state";s:40:"iMq5mTYbGUH2W3r3XTj5iVcCbGe9fbQajVPr9NFl";}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:5:{s:6:"_token";s:40:"EuHO3GfDfVoD7SGaZVwMVeghOk2ih2vchZyZSrfG";s:3:"url";a:1:{s:8:"intended";s:35:"http://127.0.0.1:8000/app/dashboard";}s:9:"_previous";a:1:{s:3:"url";s:30:"http://127.0.0.1:8000/register";}s:6:"_flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}s:5:"state";s:40:"3CPmPh6632Z354d1Z7ryEc0HX6XuOQek39IvbIE6";}
153 changes: 153 additions & 0 deletions storage/framework/views/37f7ae10cbda4642450df0fba040e0acb369a56f.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<?php $__env->startSection('content'); ?>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header"><?php echo e(__('Register')); ?></div>

<div class="card-body">
<form method="POST" action="<?php echo e(route('register')); ?>">
<?php echo csrf_field(); ?>

<div class="form-group row">
<label for="name" class="col-md-4 col-form-label text-md-right"><?php echo e(__('Name')); ?></label>

<div class="col-md-6">
<input id="name" type="text"
class="form-control <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="name"
value="<?php echo e(old('name')); ?>" required autocomplete="name" autofocus>

<?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
<span class="invalid-feedback" role="alert">
<strong><?php echo e($message); ?></strong>
</span>
<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
</div>
</div>

<div class="form-group row">
<label for="email"
class="col-md-4 col-form-label text-md-right"><?php echo e(__('E-Mail Address')); ?></label>

<div class="col-md-6">
<input id="email" type="email"
class="form-control <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="email"
value="<?php echo e(old('email')); ?>" required autocomplete="email">

<?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
<span class="invalid-feedback" role="alert">
<strong><?php echo e($message); ?></strong>
</span>
<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
</div>
</div>

<div class="form-group row">
<label for="password"
class="col-md-4 col-form-label text-md-right"><?php echo e(__('Password')); ?></label>

<div class="col-md-6">
<input id="password" type="password"
class="form-control <?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="password"
required autocomplete="new-password">

<?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
<span class="invalid-feedback" role="alert">
<strong><?php echo e($message); ?></strong>
</span>
<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
</div>
</div>

<div class="form-group row">
<label for="password-confirm"
class="col-md-4 col-form-label text-md-right"><?php echo e(__('Confirm Password')); ?></label>

<div class="col-md-6">
<input id="password-confirm" type="password" class="form-control"
name="password_confirmation" required autocomplete="new-password">
</div>
</div>

<div class="form-group row">
<label for="password-confirm"
class="col-md-4 col-form-label text-md-right"></label>

<div class="col-md-6">
<?php echo HCaptcha::display(['data-theme' => 'dark']); ?>

<?php $__errorArgs = ['h-captcha-response'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
<span class="invalid-feedback" role="alert">
<strong><?php echo e($message); ?></strong>
</span>
<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
</div>
</div>


<div class="form-group row mb-0">
<div class="col-md-6 offset-md-4">
<button type="submit" class="btn btn-primary">
<?php echo e(__('Register')); ?>

</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.frontend.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Users/user/Desktop/php/QuickAdmin/resources/views/auth/register.blade.php ENDPATH**/ ?>
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
</p>
<a href="<?php echo e(route('login.provider', 'github')); ?>" class="btn btn-outline-secondary">Github</a>
<a href="<?php echo e(route('login.provider', 'google')); ?>" class="btn btn-outline-danger">Google</a>
<a href="<?php echo e(route('login.provider', 'facebook')); ?>" class="btn btn-outline-primary">Facebook</a>
</div>
</div>
</div>
Expand Down

0 comments on commit 7be6eef

Please sign in to comment.