Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Vue3+Firebase Auth環境で苦労した話
Search
IIHARA
January 30, 2024
Programming
220
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Vue3+Firebase Auth環境で苦労した話
IIHARA
January 30, 2024
More Decks by IIHARA
See All by IIHARA
Docusで知り合い向け学習サイト作ってみた
gityosan
0
84
新卒エンジニアが週一でいろんなLTに参加・登壇してみた話
gityosan
1
200
Nuxt3にStorybookを正しく入れてみた
gityosan
0
870
Marpをカスタマイズして爆速スライド開発環境を手に入れよう
gityosan
0
730
TiptapでストレスフリーなWYSIWYGエディター開発を!
gityosan
0
510
Vueと比べて理解するNuxtの機能~auto-import編~
gityosan
0
130
Other Decks in Programming
See All in Programming
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
4k
golang-bob.pdf
iwatsukayura
0
130
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
380
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.7k
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
33k
contenteditable と日本語入力に向き合う
colorful12
0
200
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
dotNET_vulnclicker_intro.pdf
deka_morita
0
150
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
190
AmebaブログはKMPから卒業します
kmars0605
0
210
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
KATA
mclloyd
PRO
35
16k
Marketing to machines
jonoalderson
1
5.9k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Making the Leap to Tech Lead
cromwellryan
135
10k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
370
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
300
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
So, you think you're a good person
axbom
PRO
2
2.2k
How GitHub (no longer) Works
holman
316
150k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Transcript
Vue3+Firebase Auth 環境で苦労した話 第3 木曜LT 会 #1 飯原帆隆/ 株式会社メタップスホールディングス
目次 01 自己紹介 02 前提状況 03 最終的な実装 第3 木曜LT 会
#1 2
飯原帆隆 メタップスホールディングス( 株) エンジニア 23 新卒で入社後、re:shine 開発を担当 Vue/Nuxt Rails Lit
を主に書きます X: https://twitter.com/iihara_gityo Github: https://github.com/Gityosan Qiita: https://qiita.com/Gityosan Zenn: https://zenn.dev/iihara 第3 木曜LT 会 #1 / 自己紹介 3
メタップスホールディングス 「UNLEASH THE WORLD( 世界を解き放つ) 」をビジョンに re:shine とSRE:shine の二つのサービスを展開 第3
木曜LT 会 #1 / 自己紹介 4
None
None
re:shine ではフロントでVue3 とFirebaseAuth を利用 リロード時などに上手くハンドリングできない事象が発生 第3 木曜LT 会 #1 /
前提状況 7
main.ts でvue-router のbeforeEach フックにmiddleware(routing-guard) を 登録しリロード時や遷移時に適切なルーティングができるようにしてい た。 firebase のonAuthStateChanged はfirebase
と接続ができた時やログイ ン・ログアウト時に登録したcallback を実行するがmiddleware と非同期的 に実行されていたため、callback の実行タイミングによってログインして いるのに未ログイン状態と判定されることがあった。 第3 木曜LT 会 #1 / 前提状況 8
第3 木曜LT 会 #1 / 前提状況 9
→ middleware(routing-guard) の処理をonAuthStateChanged の callback 内に移動 (provide/inject を用いた状態管理を行っている場合、middleware で状態管理 している変数を上手く呼び出せないため、そこからしてもcallback
内に移 動する必要がある) 第3 木曜LT 会 #1 / 最終的な実装 10
ご清聴ありがとうございました