-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from shopperlabs/replace-auth-with-ui-by-auth-…
…with-fortify Fix error when user logging with two-factor authentication
- Loading branch information
Showing
14 changed files
with
100 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Release Notes | ||
|
||
## v0.0.2 (2021-07-22) | ||
|
||
### Update | ||
- Laravel Livewire to v2.5 | ||
- Laravel UI Modal to v1.0.0 | ||
|
||
### Fixed | ||
- Installation version error on guzzle | ||
- Fix error on Shopper prefix `Shopper::prefix()` return value before installation of the package ([#54](https://github.com/shopperlabs/framework/pull/54)) | ||
- Fix error on publishing for vendor files | ||
- Fix error on `LaravelUIModal() not defined` | ||
- Fix error on mapbox configuration when setting up your store for the first time | ||
|
||
## v0.0.1 (2021-07-07) | ||
|
||
Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace Shopper\Framework\Contracts; | ||
|
||
use Illuminate\Contracts\Support\Responsable; | ||
|
||
interface FailedTwoFactorLoginResponse extends Responsable | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace Shopper\Framework\Http\Responses; | ||
|
||
use Illuminate\Validation\ValidationException; | ||
use Shopper\Framework\Contracts\FailedTwoFactorLoginResponse as FailedTwoFactorLoginResponseContract; | ||
|
||
class FailedTwoFactorLoginResponse implements FailedTwoFactorLoginResponseContract | ||
{ | ||
/** | ||
* Create an HTTP response that represents the object. | ||
* | ||
* @throws ValidationException | ||
*/ | ||
public function toResponse($request) | ||
{ | ||
$message = __('The provided two factor authentication code was invalid.'); | ||
|
||
if ($request->wantsJson()) { | ||
throw ValidationException::withMessages(['code' => [$message]]); | ||
} | ||
|
||
return redirect()->route('shopper.login')->withErrors(['email' => $message]); | ||
} | ||
} |
Oops, something went wrong.