I'm trying to create an Oauth2session using the sdk's but the createOauth2Session is not available on the account object for some reason await account.createOAuth2Session(Error: creatOauth2session is not available on type account)(
OAuthProvider.Google,
"http://localhost:3000",
"http://localhost:3000"
);
TypeScript
const client = new sdk.Client();
client
.setEndpoint(process.env.NEXT_PUBLIC_ENDPOINT!)
.setProject(process.env.NEXT_PUBLIC_APPWRITE_PROJECT!)
.setKey(process.env.NEXT_SECRET_APPWRITE_KEY!);
export const databases = new sdk.Databases(client);
export const users = new sdk.Users(client);
export const messaging = new sdk.Messaging(client);
export const storage = new sdk.Storage(client);
export const account = new sdk.Account(client);
TL;DR
Problem: Developer is unable to create an OAuth2 session using the Appwrite SDK, encountering an error that createOauth2session is not available on the account object.
Solution: The correct method should be createOAuth2Session instead of createOauth2session. Make sure to use the correct casing for the method name.Recommended threads
- ACTIVATE DEPLOYMENT PROBLEM...
It's not giving me the option to activate a deployment that says it's ready..
- general_unauthorized_scope
localhost oauth not working. general_unauthorized_scope error showing. { "message": "User (role: guests) missing scopes ([\"account\"])", "code": 401, ...
- Anyone manage to get a slack-bot working...
I'm trying to setup a bot the send and retrieve slack messages to a chat in my site. I've failed with SSE and appwrite functions soo far... i'll trying polling ...