0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Vue.js】Vue3でvue-google-oauth2を使用する

Posted at

概要

Vue.jsからgoogleの認証を使用する時に、vue-google-oauth2というライブラリを使用するという記事が、ちらほらあると思います。ただ、このライブラリは一見Vue3には対応してないように見え、Vue3で普通にライブラリをインストールしてもビルド時にエラーになってしまいます。
Vue3で使うにはどうしたら良いか、というのをメモ書きしておきます。

対応

ライブラリのページをよく見ると、以下の通りVue3を使う場合の参照リンクがあります。

このリンクの先に行くと、vue3-google-oauth2なるものがあって、これを使えばいけそうです。
インストールして使用してみたところvue-google-oauth2と変わらなく使用できてますので、対応としてはこのVue3用のライブラリを使うので良さそうです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?