Skip to content

Commit bd04df9

Browse files
authored
Merge pull request #19 from Illegal-Studio/develop
Bump 0.2.0 version
2 parents 13b98f5 + 88dd3f9 commit bd04df9

25 files changed

Lines changed: 316 additions & 132 deletions

CHANGELOG

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
v0.2.0
2+
3+
Implements all authentication from linky module.
4+
Correctly support authentication from the main laravel application.
5+
6+
v0.1.1
7+
8+
Bug fixing
9+
10+
v0.1
11+
12+
First realease, with basic functionality.
13+
It contains:
14+
- Links management
15+
- Collections management
16+
- Pages management
17+
- Basic authentication

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,3 @@ If false, the application will be accessible without authentication.
5858
#### LINKY_AUTH_MULTI_TENANT
5959
True or false. If true, the application will be multi-tenant.
6060
Each user will only be able to access his own contents.
61-
62-
63-
#### LINKY_AUTH_LOGIN_ROUTE_NAME
64-
The route path of the login page.
65-
66-
Configure the route path of the login page of your application, if you have
67-
configured LINKY_AUTH_USE_LINKY_AUTH to false.

config/linky.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
'use_linky_auth' => env('LINKY_AUTH_USE_LINKY_AUTH', true),
77
'require_valid_user' => env('LINKY_AUTH_REQUIRE_VALID_USER', true),
88
'multi_tenant' => env('LINKY_AUTH_MULTI_TENANT', false),
9-
'login_route_name' => env('LINKY_AUTH_LOGIN_ROUTE_NAME', 'login'),
9+
'functionalities' => [
10+
'register' => env('LINKY_AUTH_FUNCTIONALITIES_REGISTER', true),
11+
'forgot_password' => env('LINKY_AUTH_FUNCTIONALITIES_FORGOT_PASSWORD', true),
12+
'email_verification' => env('LINKY_AUTH_FUNCTIONALITIES_EMAIL_VERIFICATION', true),
13+
'user_profile' => env('LINKY_AUTH_FUNCTIONALITIES_USER_PROFILE', true),
14+
]
1015
],
1116
'db' => [
1217
'prefix' => env('LINKY_DB_PREFIX', 'linky_'),

resources/views/auth/confirm-password.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{ __('This is a secure area of the application. Please confirm your password before continuing.') }}
44
</div>
55

6-
<form method="POST" action="{{ route('password.confirm') }}">
6+
<form method="POST" action="{{ route('linky.auth.password.confirm') }}">
77
@csrf
88

99
<!-- Password -->

resources/views/auth/forgot-password.blade.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
{{ __('Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.') }}
44
</div>
55

6-
<form method="POST" action="{{ route('password.email') }}">
6+
@if (session('status'))
7+
<div class="mb-4 font-medium text-sm text-green-600">
8+
{{ session('status') }}
9+
</div>
10+
@endif
11+
12+
<form method="POST" action="{{ route('linky.auth.password.email') }}">
713
@csrf
814

915
<!-- Email Address -->

resources/views/auth/login.blade.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<x-linky::layout>
2-
<form method="POST" action="{{ route('login') }}">
2+
<form method="POST" action="{{ route('linky.auth.login') }}">
33
@csrf
44

55
<!-- Email Address -->
@@ -30,8 +30,8 @@
3030
</div>
3131

3232
<div class="flex items-center justify-end mt-4">
33-
@if (Route::has('password.request'))
34-
<a class="underline text-sm text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" href="{{ route('password.request') }}">
33+
@if (Route::has('linky.auth.password.request'))
34+
<a class="underline text-sm text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" href="{{ route('linky.auth.password.request') }}">
3535
{{ __('Forgot your password?') }}
3636
</a>
3737
@endif
@@ -40,5 +40,14 @@
4040
{{ __('Log in') }}
4141
</x-linky::button-primary>
4242
</div>
43+
44+
<div class="mt-10 flex flex-col items-center sm:flex-col sm:items-start sm:mt-2">
45+
@if (Route::has('linky.auth.register'))
46+
<a class="underline text-sm text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" href="{{ route('linky.auth.register') }}">
47+
{{ __('Dont\'t have an account? Register here') }}
48+
</a>
49+
@endif
50+
</div>
51+
4352
</form>
4453
</x-linky::layout>

resources/views/auth/register.blade.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<x-linky::layout>
2-
<form method="POST" action="{{ route('register') }}">
2+
<form method="POST" action="{{ route('linky.auth.register') }}">
33
@csrf
44

55
<!-- Name -->
@@ -40,9 +40,11 @@
4040
</div>
4141

4242
<div class="flex items-center justify-end mt-4">
43-
<a class="underline text-sm text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" href="{{ route('login') }}">
44-
{{ __('Already registered?') }}
45-
</a>
43+
@if (Route::has('linky.auth.login'))
44+
<a class="underline text-sm text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" href="{{ route('linky.auth.login') }}">
45+
{{ __('Already registered?') }}
46+
</a>
47+
@endif
4648

4749
<x-linky::button-primary class="ml-4">
4850
{{ __('Register') }}

resources/views/auth/reset-password.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<x-linky::layout>
2-
<form method="POST" action="{{ route('password.store') }}">
2+
<form method="POST" action="{{ route('linky.auth.password.store') }}">
33
@csrf
44

55
<!-- Password Reset Token -->

resources/views/auth/verify-email.blade.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
@endif
1111

1212
<div class="mt-4 flex items-center justify-between">
13-
<form method="POST" action="{{ route('verification.send') }}">
13+
<form method="POST" action="{{ route('linky.auth.verification.send') }}">
1414
@csrf
1515

1616
<div>
@@ -20,12 +20,14 @@
2020
</div>
2121
</form>
2222

23-
<form method="POST" action="{{ route('logout') }}">
24-
@csrf
23+
@if (Route::has('linky.auth.logout'))
24+
<form method="POST" action="{{ route('linky.auth.logout') }}">
25+
@csrf
2526

26-
<button type="submit" class="underline text-sm text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
27-
{{ __('Log Out') }}
28-
</button>
29-
</form>
27+
<button type="submit" class="underline text-sm text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
28+
{{ __('Log Out') }}
29+
</button>
30+
</form>
31+
@endif
3032
</div>
3133
</x-linky::layout>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<a {{ $attributes->merge(['class' => 'inline-flex justify-center rounded-md border border-transparent bg-indigo-500 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-opacity-75 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 transition ease-in-out duration-150' ]) }}>
2+
{{ $slot }}
3+
</a>

0 commit comments

Comments
 (0)