Skip to main content

Oauth

Ryan SULess than 1 minute

The system offer google and github Oauth log in by default

How to get clientID and client secret? googleopen in new windowgithubopen in new window

Add provider

picture
picture

Edit src/views/sys/login/LoginForm.vue

<div class="flex justify-evenly enter-x" :class="`${prefixCls}-sign-in-way`">
  <GithubFilled @click="oauthLoginHandler('github')" />
  <WechatFilled />
  <AlipayCircleFilled />
  <GoogleCircleFilled @click="oauthLoginHandler('google')" />
  <TwitterCircleFilled />
</div>

Add icon and click event with the provider name param mode is put the token in the URL header mode is put the token in the 'authorization' header