Closed as not planned
Description
👟 Reproduction steps
import { ID, Permission, Role } from 'appwrite'
import type { Models } from 'appwrite'
import { get, writable } from 'svelte/store'
import { sdk, server } from '$lib/appwrite/appwrite'
export type State = {
account: Models.User<Models.Preferences> | null
}
const createState = () => {
const { subscribe, set, update } = writable<State>({
account: null,
})
return {
// ...
oAuth: async (provider: string, redirectURL: string) => {
sdk.account.createOAuth2Session(provider, redirectURL) // have no idea how to get user information
const urlParams = new URLSearchParams(window.location.search)
const code = urlParams.get('code')
console.log(code) // nothing
}
}
}
export const state = createState()
// ...
<IconButton on:click={() => state.oAuth('github', `https://${data.hostname}`)}></IconButton>
// ...
👍 Expected behavior
I should be able to access the user's GitHub details. The createOAuth2Session
function does not return anything.
👎 Actual Behavior
OAuth and redirection was successful but no code parameter was passed onto my application.
🎲 Appwrite version
Appwrite Cloud
💻 Operating system
Linux
🧱 Your Environment
- TypeScript
- SvelteKit
- Web SDK
- Gitpod
- Vercel
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct