TODO: lire les documentation officielles provenant des 4 plate-formes tranquillement afin de ccomprendre commet doit on tester ces type d'auth quitte a créé un sous domaine particulier directement hebergé sur gittea
-->Sécuriser le serveur de dev
... | ... |
@@ -19,15 +19,16 @@ |
19 | 19 |
</li> |
20 | 20 |
@endif |
21 | 21 |
@endforeach |
22 |
- <ul> |
|
23 |
- @endsection |
|
22 |
+ </ul> |
|
23 |
+@endsection |
|
24 | 24 |
|
25 |
- @section('top-javascript') |
|
26 |
- <script> |
|
27 |
- function auth_popup(provider) { |
|
28 |
- // replace 'path/to/hybridauth' with the real path to this script |
|
29 |
- var authWindow = window.open('/control/authentification-callback-example/provider/' + provider, 'authWindow', 'width=600,height=400,scrollbars=yes'); |
|
30 |
- return false; |
|
31 |
- } |
|
32 |
- </script> |
|
25 |
+@section('top-javascript') |
|
26 |
+ <script> |
|
27 |
+ function auth_popup(provider) { |
|
28 |
+ // replace 'path/to/hybridauth' with the real path to this script |
|
29 |
+ var authWindow = window.open('{{ \MVC\Classe\Url::link_rewrite(true, 'authentification-callback-example', []) }}/provider/' + provider, 'authWindow', 'width=600,height=400,scrollbars=yes'); |
|
30 |
+ return false; |
|
31 |
+ } |
|
32 |
+ </script> |
|
33 | 33 |
@endsection |
34 |
+ |
TODO: aller chercher les token et les id des authentifcation pour google, github, facebook, twitter ... Reste a tester et à décider pour les autres types d'authentification.
Emmanuel ROY authored on 26/09/2019 04:27:051 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,33 @@ |
1 |
+@extends('body') |
|
2 |
+ |
|
3 |
+@section('sidebar') |
|
4 |
+ @parent |
|
5 |
+ |
|
6 |
+ <p>This is appended to the master sidebar.</p> |
|
7 |
+@endsection |
|
8 |
+ |
|
9 |
+@section('content') |
|
10 |
+ <h1>Sign in</h1> |
|
11 |
+ |
|
12 |
+ <ul> |
|
13 |
+ @foreach ($hybridauth->getProviders() as $name) |
|
14 |
+ @if (!isset($adapters[$name])) |
|
15 |
+ <li> |
|
16 |
+ <a href="#" onclick="javascript:auth_popup('{{ $name }}');"> |
|
17 |
+ Sign in with {{ $name }} |
|
18 |
+ </a> |
|
19 |
+ </li> |
|
20 |
+ @endif |
|
21 |
+ @endforeach |
|
22 |
+ <ul> |
|
23 |
+ @endsection |
|
24 |
+ |
|
25 |
+ @section('top-javascript') |
|
26 |
+ <script> |
|
27 |
+ function auth_popup(provider) { |
|
28 |
+ // replace 'path/to/hybridauth' with the real path to this script |
|
29 |
+ var authWindow = window.open('/control/authentification-callback-example/provider/' + provider, 'authWindow', 'width=600,height=400,scrollbars=yes'); |
|
30 |
+ return false; |
|
31 |
+ } |
|
32 |
+ </script> |
|
33 |
+@endsection |