Rank 2: Process
but what is url. i have not eny url to past
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 2: Process
but what is url. i have not eny url to past
Rank 2: Process
print(res.secret); - empty string
Anyway, updateMagicURLSession should be called on the page the user hits when clicking the link, not directly after calling createMagicURLSession - you don’t have the secret here yet
I’m not much into mobile dev, but I believe you should be able to create a “deeplink” which hits a specific page with your app?
Rank 2: Process
buy if user hit to link he get some page with your Magic url login flow is missing a propper riderect URL. Please check the Magic URL docs and send request for new session with a valid redirect URl
Not sure how query parameters would be handled with that
Because you haven’t set a redirect URL - you need to pass one in createMagicURLSession as the url parameter
Rank 2: Process
yes. but how i can to know what url it is must be? i have no my domain or some like that
Rank 2: Process
i use appwrite cloud
Rank 2: Process
i get this lisnk. and it give your Magic url login flow is missing a propper riderect URL. Please check the Magic URL docs and send request for new session with a valid redirect URl
My understanding here is that you’ll have to create a deeplink to a component in your app that can handle the completion of the login process
As I’ve said, I don’t really know mobile dev - you might want to wait for someone who does and might have a better solution here.
Rank 2: Process
thank you
ideclon is correct. You must implement deep linking. There are resources online regarding deep linking. For example: https://docs.flutter.dev/ui/navigation/deep-linking
Rank 2: Process
`
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="cloud.appwrite.io"
android:pathPrefix="/auth/magic-url" />
</intent-filter>`
Rank 2: Process
`final GoRouter _router = GoRouter(routes: [
GoRoute(
path: "/",
builder: ((context, state) => const MainAuthScreen()),
),
GoRoute(
name: "/auth/magic-url",
path: "/profile",
builder: ((context, state) => const ProfileScreen()),
),
]);`
Rank 2: Process
app is open but i see GoException: no routes for location: https://cloud.appwrite.io/auth/magic-url?userId=1694069134667&secret=d2a7ad2c398d34f3b4bc9b7fedb7d21c77dd1fc374c0df90d4cc5f4947eb7707da4cfcf5f6d348dec20a4c75459bf3cb88927b858e7c24a753ab2ca8e1d8f5234359deb0c1e90813851d49de9bbfafbcf0e81450c633cb45daa6b4144c7a94707dcfdc5454edfe3600a5eec40f112fb49eb6c18a026cfcdc59bb55edadd1db21&expire=2023-09-14+08:38:46.254&project=myapp
can you show your complete GoRoute config and implementation?
Rank 2: Process
` MaterialApp.router(
builder: (context, child) {
return ScrollConfiguration(
behavior: MyBehavior(),
child: child!,
);
},
debugShowCheckedModeBanner: false,
title: 'Iskra',
theme: MaterialThemeData().materialThemeData,
routerConfig: _router,
),
);
},
);
}
}
final GoRouter _router = GoRouter(routes: [
GoRoute(
path: "/",
builder: ((context, state) => const MainAuthScreen()),
),
GoRoute(
name: "/auth/magic-url",
path: "/profile",
builder: ((context, state) => const ProfileScreen()),
),
]);
You’ve set your path for handling magic link session on path: /profile. Try using /auth/magic-url as path.
Rank 2: Process
Thank you Sir!!!
Great! Can this thread be marked [Solved] then?
Rank 2: Process
yes, sure. Do you know, how i can change icon and text in recived mail? and How i can get userId and secret form this url?
v1.4 allowes you to modify email templates, but Cloud is not on 1.4 yet.
make sure to use 3 backticks for multiline code like:
```xml<xml>```