File tree Expand file tree Collapse file tree 2 files changed +42
-8
lines changed Expand file tree Collapse file tree 2 files changed +42
-8
lines changed Original file line number Diff line number Diff line change @@ -138,16 +138,18 @@ GoRouter createRouter({
138
138
final isLinkingContext =
139
139
currentUri.queryParameters['context' ] == 'linking' ;
140
140
141
- // If an authenticated/anonymous user tries to access the BASE /authentication path
142
- // AND it's NOT for account linking, redirect them to the feed.
143
- if (currentLocation == authenticationPath && ! isLinkingContext) {
141
+ // If an authenticated/anonymous user is on any authentication-related path,
142
+ // redirect them to the feed, unless it's the base authentication path
143
+ // AND it's specifically for account linking.
144
+ if (currentLocation.startsWith (authenticationPath) &&
145
+ ! (currentLocation == authenticationPath && isLinkingContext)) {
144
146
print (
145
- ' Action: $appStatus user trying to access base auth path without linking context . Redirecting to $feedPath ' ,
147
+ ' Action: $appStatus user trying to access an auth path. Redirecting to $feedPath ' ,
146
148
);
147
149
return feedPath;
148
150
}
149
151
150
- // Allow access to other routes (including auth sub-routes if linking , or any other app route )
152
+ // Allow access to other routes (only if not an auth path , or if it's the base auth path for linking )
151
153
print (
152
154
' Action: Allowing navigation to $currentLocation for $appStatus user.' ,
153
155
);
Original file line number Diff line number Diff line change @@ -89,6 +89,14 @@ packages:
89
89
url: "https://pub.dev"
90
90
source: hosted
91
91
version: "1.4.0"
92
+ checked_yaml:
93
+ dependency: transitive
94
+ description:
95
+ name: checked_yaml
96
+ sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f"
97
+ url: "https://pub.dev"
98
+ source: hosted
99
+ version: "2.0.4"
92
100
cli_config:
93
101
dependency: transitive
94
102
description:
@@ -97,6 +105,14 @@ packages:
97
105
url: "https://pub.dev"
98
106
source: hosted
99
107
version: "0.2.0"
108
+ cli_util:
109
+ dependency: transitive
110
+ description:
111
+ name: cli_util
112
+ sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c
113
+ url: "https://pub.dev"
114
+ source: hosted
115
+ version: "0.4.2"
100
116
clock:
101
117
dependency: transitive
102
118
description:
@@ -270,6 +286,14 @@ packages:
270
286
url: "https://pub.dev"
271
287
source: hosted
272
288
version: "9.1.1"
289
+ flutter_launcher_icons:
290
+ dependency: "direct main"
291
+ description:
292
+ name: flutter_launcher_icons
293
+ sha256: "10f13781741a2e3972126fae08393d3c4e01fa4cd7473326b94b72cf594195e7"
294
+ url: "https://pub.dev"
295
+ source: hosted
296
+ version: "0.14.4"
273
297
flutter_localizations:
274
298
dependency: "direct main"
275
299
description: flutter
@@ -356,7 +380,7 @@ packages:
356
380
description:
357
381
path: "."
358
382
ref: HEAD
359
- resolved-ref: "028ebfa29ebc8f95c2da30fee68566723d1e6897 "
383
+ resolved-ref: "3a8dc5ff81c59805fa59996517eb0fdf136a0b67 "
360
384
url: "https://github.com/headlines-toolkit/ht-auth-inmemory"
361
385
source: git
362
386
version: "0.0.0"
@@ -501,10 +525,18 @@ packages:
501
525
dependency: transitive
502
526
description:
503
527
name: js
504
- sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc"
528
+ sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
529
+ url: "https://pub.dev"
530
+ source: hosted
531
+ version: "0.6.7"
532
+ js_interop:
533
+ dependency: "direct main"
534
+ description:
535
+ name: js_interop
536
+ sha256: "7ec859c296958ccea34dc770504bd3ff4ae52fdd9e7eeb2bacc7081ad476a1f5"
505
537
url: "https://pub.dev"
506
538
source: hosted
507
- version: "0.7.2 "
539
+ version: "0.0.1 "
508
540
json_annotation:
509
541
dependency: transitive
510
542
description:
You can’t perform that action at this time.
0 commit comments