(github) login with GitHub

This commit is contained in:
2021-03-15 21:53:07 +01:00
parent 5642ee2535
commit 8dcd670e46
3 changed files with 36 additions and 4 deletions

View File

@@ -0,0 +1,32 @@
<template>
<div class="login-github">
<br />
<a ;href="url" target="_blank" rel="noopener noreferrer">
login to
<img src="@/assets/icons/github.svg" alt="GitHub icon" />
</a>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
name: 'LoginGithub',
setup() {
const url = new URL('https://github.com/login/oauth/authorize')
url.searchParams.append('client_id', 'Iv1.87be14adcc912fa0')
url.searchParams.append('redirect_uri', location.href)
url.searchParams.append('scope', 'repo')
return {
url
}
}
})
</script>
<style lang="scss" scoped>
.login-github {
}
</style>