File tree Expand file tree Collapse file tree
apps/codingcatdev/src/routes/(content-single)/(non-course)/post/firebase-app-check-web Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ authors :
3+ - alex-patterson
4+ cloudinary_convert : false
5+ cover : ' https://media.codingcat.dev/image/upload/v1683910220/main-codingcatdev-photo/Firebase-App-Check.png'
6+ devto :
7+ excerpt : Learn how to add Firebase App Check using reCAPTCHA v3, to your next website and block those malicious requests!
8+ hashnode :
9+ published : published
10+ slug : firebase-app-check-web
11+ start : May 12, 2023
12+ title : Firebase App Check
13+ youtube : https://youtu.be/bpTw4aMxCU8
14+ ---
15+
16+ ## Adding App Check
17+
18+ With just a few lines of code you can include app check into your website
19+
20+ ``` ts
21+ import { initializeAppCheck , ReCaptchaV3Provider } from ' firebase/app-check' ;
22+
23+ if (import .meta .env .DEV ) {
24+ // @ts-ignore
25+ self .FIREBASE_APPCHECK_DEBUG_TOKEN = true ;
26+ }
27+
28+ initializeAppCheck (app , {
29+ provider: new ReCaptchaV3Provider (' 6LdAIqQlAAAAAC4kq-bag4J-HmAAVe_pu7T75QOf' ),
30+ isTokenAutoRefreshEnabled: true
31+ });
32+ ```
33+
34+ ## Full Repo
35+
36+ You can clone the full repo from [ GitHub] ( https://github.com/CodingCatDev/firebase-app-check ) .
37+
38+ <section class =" aspect-video " >
39+ <iframe
40+ title="stackblitz for firebase app check"
41+ src="https://stackblitz.com/github/CodingCatDev/firebase-app-check?embed=1&file=src/App.svelte"
42+ frameborder="0"
43+ height="100%"
44+ width="100%"
45+ loading="lazy"
46+ />
47+ </section >
You can’t perform that action at this time.
0 commit comments