|
|
@@ -41,6 +41,8 @@
|
|
|
import { useEntityFetch } from '~/composables/data/useEntityFetch'
|
|
|
import AuthUrl from '~/models/Custom/HelloAsso/AuthUrl'
|
|
|
|
|
|
+const route: RouteLocationNormalizedLoaded = useRoute()
|
|
|
+
|
|
|
const { fetch } = useEntityFetch()
|
|
|
|
|
|
const { data: authUrl, status } = fetch(AuthUrl)
|
|
|
@@ -51,11 +53,19 @@ const onHelloAssoConnectClicked = () => {
|
|
|
if (status.value !== 'success') {
|
|
|
console.log('still pending')
|
|
|
} else {
|
|
|
- console.log(authUrl)
|
|
|
showDialog.value = true
|
|
|
navigateTo(authUrl.value!.authUrl, { external: true })
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+const authorizationCode: Ref<string | null> = ref(null)
|
|
|
+
|
|
|
+if (route.query.code) {
|
|
|
+ authorizationCode.value = route.query.code as string
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|