#2 - authentication via google #16

Merged
Baakoma merged 10 commits from #2-auth-via-google into main 2022-01-13 14:19:11 +01:00
Baakoma commented 2022-01-13 09:25:49 +01:00 (Migrated from github.com)

It should close #2

image

It should close #2 ![image](https://user-images.githubusercontent.com/16743001/149325628-97525359-a5f4-4eba-8e86-49070c6cadf0.png)
krzysztofrewak (Migrated from github.com) requested changes 2022-01-13 13:42:19 +01:00
@@ -0,0 +26,4 @@
$user = User::query()
->where("email", $socialUser->getEmail())
->firstOrFail();
} catch (ModelNotFoundException) {
krzysztofrewak (Migrated from github.com) commented 2022-01-13 13:38:29 +01:00

Is this try-catch really refers to entire block of code? And maybe this failed redirect could be move to the exception?

Is this try-catch really refers to entire block of code? And maybe this failed redirect could be move to the exception?
@@ -0,0 +12,4 @@
{
public function __invoke(Request $request): RedirectResponse
{
Auth::logout();
krzysztofrewak (Migrated from github.com) commented 2022-01-13 13:40:44 +01:00
        $request->user()?->logout();
```suggestion $request->user()?->logout(); ```
krzysztofrewak (Migrated from github.com) commented 2022-01-13 13:41:15 +01:00

Could it be null with route()?

Could it be null with `route()`?
krzysztofrewak (Migrated from github.com) commented 2022-01-13 13:41:57 +01:00
</script>

```suggestion </script> ```
krzysztofrewak (Migrated from github.com) commented 2022-01-13 13:42:07 +01:00
}

```suggestion } ```
Baakoma (Migrated from github.com) reviewed 2022-01-13 13:55:27 +01:00
Baakoma (Migrated from github.com) commented 2022-01-13 13:55:27 +01:00

It doesn't work.

It doesn't work.
Baakoma (Migrated from github.com) reviewed 2022-01-13 14:01:50 +01:00
@@ -0,0 +26,4 @@
$user = User::query()
->where("email", $socialUser->getEmail())
->firstOrFail();
} catch (ModelNotFoundException) {
Baakoma (Migrated from github.com) commented 2022-01-13 14:01:50 +01:00

I would like to keep it simple for now. I'll refactor it when error handling and notifications/alerts will work.

I would like to keep it simple for now. I'll refactor it when error handling and notifications/alerts will work.
krzysztofrewak (Migrated from github.com) approved these changes 2022-01-13 14:15:59 +01:00
EwelinaLasowy (Migrated from github.com) approved these changes 2022-01-13 14:19:04 +01:00
Sign in to join this conversation.