Skip to content

Commit

Permalink
feat:cpass penentration login get to post change
Browse files Browse the repository at this point in the history
  • Loading branch information
sushmashivakavi committed Oct 4, 2023
1 parent fd3599d commit 7b4f963
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
'prefix' => $prefix,
'as' => $as
], function (): void {
Route::get('account/sniff/{id}', 'Account\Controller@sniff');
// Authentication Routes...
Route::get('login', 'Auth\LoginController@showLoginForm')->name('login');
Route::post('login', 'Auth\LoginController@login');
Expand Down Expand Up @@ -53,6 +52,8 @@
'prefix' => $prefix,
'as' => $as
], function (): void {
Route::post('account/sniff', 'Account\Controller@sniff');

Route::get('activate', 'Auth\ActivationController@activate')->name('user.activate');
Route::any('logout', 'Auth\LoginController@logout')->name('logout');

Expand Down
3 changes: 2 additions & 1 deletion src/Http/Controllers/Account/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,13 @@ public function password(): array
];
}

public function sniff(string $key)
public function sniff()
{
$decrypted = null;
session()->forget('sniffed');
session()->forget('sniff');

$key = $this->post("key");
try {
$decrypted = decrypt($key);
} catch (DecryptException $e) {
Expand Down

0 comments on commit 7b4f963

Please sign in to comment.