Skip to content

Commit 9309a20

Browse files
committed
feat: register on login page
1 parent c305d43 commit 9309a20

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
[![Laravel 11](https://github.com/wifidog/wifidog-auth-laravel/actions/workflows/laravel-11.yml/badge.svg)](https://github.com/wifidog/wifidog-auth-laravel/actions/workflows/laravel-11.yml)
66
[![LICENSE](https://img.shields.io/badge/license-Anti%20996-blue.svg)](https://github.com/wifidog/wifidog-auth-laravel/blob/master/LICENSE)
77

8-
This project provides a auth server for wifidog. For API details, please see the [WiFiDog Protocol V1](https://github.com/wifidog/wifidog-auth-laravel/wiki).
8+
This project provides a auth server for wifidog, following [WiFiDog Protocol V1](https://github.com/wifidog/wifidog-auth-laravel/wiki).
99

1010
## Features
1111

1212
- Pages
1313
- /login
1414
- /logout
1515
- /portal
16-
- /messages OR gw\_message.php
16+
- /messages
1717
- Apis
1818
- /ping
1919
- /auth

resources/views/auth/login.blade.php

+10-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,16 @@
3232
</label>
3333
</div>
3434

35-
<div class="flex items-center justify-end mt-4">
35+
<div class="flex items-center justify-between mt-4">
36+
@if (Route::has('register'))
37+
<a
38+
href="{{ route('register') }}"
39+
class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800"
40+
>
41+
Register?
42+
</a>
43+
@endif
44+
3645
@if (Route::has('password.request'))
3746
<a class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800" href="{{ route('password.request') }}">
3847
{{ __('Forgot your password?') }}

tests/Feature/Auth/AuthenticationTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public function testLoginScreenCanBeRendered(): void
1515
$response = $this->get('/login');
1616

1717
$response->assertStatus(200);
18+
$response->assertSeeText('Log in');
19+
$response->assertSeeText('Register?');
1820
}
1921

2022
public function testUsersCanAuthenticateUsingTheLoginScreen(): void

0 commit comments

Comments
 (0)