what url does it mean in the docs of verification with email?
import { Client, Account } from "appwrite";
const client = new Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>'); // Your project ID
const account = new Account(client);
const result = await account.createVerification( 'https://example.com' // url );
console.log(response);
(session?: string)
I recommend going with the setting a cookie route and use that cookie in each request, like this:
do you mean this? (the thing i replied too) or you still typing
Yes
You should first look over this. You are registering and logging in at the same time, and after logging in you are (again) redirecting to the login page. Makes no sense to do this, seems like an infinite loop.
If you wanna do it your way, you should keep watching Dennis's video. Seems like you stopped halfway as you made some weird path to what you are now with logging in/registering
hey @faye I checked the jwt secret that was created when logged in or in sign up, on jwt.io, it does not have any payload, it just has $id and secret in header
maybee im not retreving the session correctly?
register has no payload
afaik
and when i login too
how do we fix it? Is it my problem or is it appwrites. I watched the video fully, he does not do register, but login code is the same as his.
here is a decode token i got after logging in with his code { "id": "the id", "secret": "the secret" } no payload
How are you creating this JWT? And what are you using it for?
it creates a session with the logged in user, (name email, password)
I’m not really clear on what you’re trying to do here
If you’re just trying to do email verification, once you’ve signed in, just call the account.createVerification()
method from the client side.
yep, thats the plan, but i get the error app.66bfddd300363a4e6bb0@service.cloud.appwrite.io (role: applications) missing scope (account)
401
when i add it
That means that you’re doing this from the Server SDK, not the Client SDK
Essentially, you’re not signed in as a user
but why does it still display the information of the user as if it was signed in, like the name when i haven't inputted it, but it was still retrieved, and redirected me to the protected page
what should I add, to avoid this error, and receive the email in my inbox to verify
Well, what are you displaying and how are you displaying it?
Recommended threads
- delete document problems
i don't know what's going on but i get an attribute "tournamentid" not found in the collection when i try to delet the document... but this is just the document...
- Rate Limit of project
AppwriteException: Rate limit for the current endpoint has been exceeded. Please try again after some time. So , how much time I have to wait and why does it h...
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...