
Trying to authenticate user using cookie- the cookie stores the 'secret' code. Literally following the guide on the website. Thinking at minimum the guideline code should work ?
I'm getting the error:
User (role: guests) missing scope (account)
i take the secret from the google auth sign in (in the url/ poor practise- don't understand how it's done this way) then i set the session with the secret from the cookie and use that to account.get()- see below- (python-fastapi server side) `` client2=Client() sessionclient= client2.set_endpoint('https://cloud.appwrite.io/v1').set_project('xx')
@app.post("/api/newforumpost", status_code=status.HTTP_200_OK) async def newpostforum( request: Request , post_title: str = Form(...) , post_body: str = Form(...) , Forum_name: str = Form(...), postimages: list[UploadFile] = File(None) ): try: greencookie= request.cookies.get('greenvillelogin') #print(forumnamedict[Forum_name.capitalize()]) sessionclient.set_session(greencookie) account = Account(sessionclient) user = account.get() print(user) forumpostimages=[]``
Recommended threads
- Can Anonymous Sessions Be Converted to U...
According to the documentation, anonymous sessions can be converted into user accounts using email/password, phone (SMS), magic URL, or OAuth2. However, Email O...
- Please help! Login issues with IOS
Hi, I am facing issue with login when I use `account.createEmailPasswordSession(email, password)` or `account.createSession(userId, secret)` . Error `load fail...
- Getting 500 error code during redirectio...
I am getting this error with openid connect oauth2 with keycloak i am using appwrite version 15.5.5 an keycloaks version 23.0 (error 500 after logging in using ...
