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 1 year has passed since last update.

Auth0を用いたVue.jsアプリへのログイン機能導入方法 メモ

Posted at
  • 認証基盤サービス(IDaaS)のAuth0を使ってVue.jsアプリにログイン機能を追加する方法についてメモする。

事前準備

  • Auth0 アカウント登録+ログイン
    • 無料トライアル版で実施

アプリケーション登録+サンプル取得

  • ダッシュボード/アプリケーション管理画面より「Create Application」を選択
  • アプリケーション名を入力し、「Single Page Application」を選択して「Create」を押下
  • 使用言語として「Vue」を選択
  • 「Download Sample」を選択し、Vue.jsサンプルを取得
  • ダッシュボード/アプリケーション管理画面より作成したアプリケーションを選択し、以下の項目にhttp://localhost:3000を入力し、保存する。
    • Allowed Callback URLs
    • Allowed Logout URLs
    • Allowed Web Origins

SDKインストール

npm install @auth0/auth0-vue

動作確認

  • ダウンロードしたサンプルディレクトリで以下のコマンドを実行する。

    npm run serve
    

    http://localhost:3000でアプリが起動する。

  • http://localhost:3000にアクセスし、「Login」を押下

    vue-auth0.png

  • 下記Auth0ログイン画面が表示されるので、ログインする。

    auth0-login.png

参考情報

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?