-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creation of a session is prohibited when a session is active #23
Comments
With this error, you can go to the Auth section of Appwrite -> Click on the account you just registered -> select the session tab, and then delete |
Thanks... let me try and i will give you the feedback
…On Sun, 12 May 2024, 19:12 Daiki11101, ***@***.***> wrote:
With this error, you can go to the Auth section of Appwrite -> Click on
the account you just registered -> select the session tab, and then delete
I hope this will help you
—
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXVZDUYSMHMFJCC4XJBGHLTZB6IIJAVCNFSM6AAAAABHQ3VOF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBWGMYDEOJYGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
it have worked thanks👍👍👍
…On Mon, 13 May 2024 at 12:05, Robert Main ***@***.***> wrote:
Thanks... let me try and i will give you the feedback
On Sun, 12 May 2024, 19:12 Daiki11101, ***@***.***> wrote:
> With this error, you can go to the Auth section of Appwrite -> Click on
> the account you just registered -> select the session tab, and then delete
> I hope this will help you
>
> —
> Reply to this email directly, view it on GitHub
> <#23 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AXVZDUYSMHMFJCC4XJBGHLTZB6IIJAVCNFSM6AAAAABHQ3VOF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBWGMYDEOJYGA>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Can somebody help me to resolve my issue |
thanks men |
I did exactly what u said , but I couldn't find any active session |
Thanks man it worked |
Try this Stop server and Start again |
i tried multiple times |
for signup details are stored in DB but at the same time getting an error |
Bro check delete browse locale storage data or else it may have error in configureing the Appwrite i guess |
Problem is resolved i am deleting all previous sessions when user is trying to log in. by using this method deleteSessions(). |
where are you using deleteSession ? |
how |
I solved the issue with the following snippets: In your appwrite.js you add these two functions:
Then, you import these two functions and add them into your sign-in.jsx, here is the full one (minus the return): Full sign-in.jsx (minus the return):
This will first check for an active session, and if there is an active session it will delete it and then proceed to login. Try and see if it works for you, but I tried 50 different solutions and always ended up with the same problem, and finally, this one works time after time without any issues. |
it work perfectly , but is that normal for each user loging a message pop out says: user loging successfully , wouldn't be better if there is a way of discarding it ? |
Yes of course, I just added it to make sure I saw when the user was logged in - Because there were so many issues around it :) I'd recommend to remove all of those later! |
I would suggest appwrite team to resolve it internally. Its quite common if anyone has signed out or not authenticated then he has to signin. His all previous sessions has to be cleared from appwrite itself. This issue I have not found in other framework. |
I find this approach most ideal as it gives you the flexibility to decide what you want to do with session. you can either delete all session before each login or after ensuring that a session exists for a particular user and is still valid, you can decide to redirect the user to '/intended-route' import { View, Text, ScrollView, Image, Alert } from 'react-native' const SignIn = () => { const [form, setForm] = useState({ const submit = async () => {
}; thanks @Milton3000 |
In line with my responds to @Milton3000 's post. I decided to do something with the session if indeed I found out that the user already has an active session instead of deleting it. I hope this helps const submit = async () => {
} |
did you mean that all added code should be deleted? |
I don't understand the question. |
@Milton3000 the code you mentioned should be deleted after the session deleted ? |
thanks man |
the method for signUp works perfectly and also in the database the user is being added but while trying to login using the same credentials i get this error "Creation of a session is prohibited when a session is active" which wont show even in the terminal where it have occurred
The text was updated successfully, but these errors were encountered: