Skip to content

Commit 5c23d23

Browse files
committed
Fixed auth
1 parent f1b6eba commit 5c23d23

File tree

7 files changed

+1254
-8
lines changed

7 files changed

+1254
-8
lines changed

dataconnect/app/public/__/auth/experiments.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta name=viewport content="width=device-width, initial-scale=1">
5+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6+
<script type="text/javascript" src="experiments.js"></script>
7+
<script type="text/javascript" src="handler.js"></script>
8+
<script type="text/javascript" nonce="firebase-auth-helper">
9+
var POST_BODY = '{{POST_BODY}}';
10+
fireauth.oauthhelper.widget.initialize();
11+
</script>
12+
</head>
13+
<body>
14+
</body>
15+
</html>

dataconnect/app/public/__/auth/handler.js

Lines changed: 634 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta name=viewport content="width=device-width, initial-scale=1">
5+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6+
<script type="text/javascript" src="iframe.js"></script>
7+
<script type="text/javascript" nonce="firebase-auth-helper">
8+
fireauth.iframe.AuthRelay.initialize();
9+
</script>
10+
</head>
11+
<body>
12+
</body>
13+
</html>

dataconnect/app/public/__/auth/iframe.js

Lines changed: 577 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dataconnect/app/src/pages/Home.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@ const ConditionalRender = ({ condition, preferred, alternate }: { condition: boo
77
)
88

99
const PlaceholderMessage = () => (
10-
<div className="min-h-screen flex items-center justify-center text-center text-4xl text-white">
11-
<h1>To get Started with Firebase Data Connect:</h1>
12-
<ol>
13-
<li><a href="https://console.firebase.google.com/project/_/authentication/settings">Add {window.location.host} to your list of domains</a></li>
14-
<li>Open the Firebase Data Connect Extension</li>
15-
<li>Select your project</li>
16-
<li>Click "Start Emulators"</li>
17-
</ol>
10+
<div className="min-h-screen flex items-center justify-center text-center text-white">
11+
<div className='px-4'>
12+
<h1 className='text-4xl'>To get Started with Firebase Data Connect:</h1>
13+
<ol className='list-decimal'>
14+
<li>Add {window.location.host}<a target="_blank" className="underline text-blue-600 hover:text-blue-800 visited:text-purple-600" href="https://console.firebase.google.com/project/_/authentication/settings"> to your list of domains</a></li>
15+
<li>Add {window.location.host}/__auth/handler<a target="_blank" className="underline text-blue-600 hover:text-blue-800 visited:text-purple-600" href="https://pantheon.corp.google.com/apis/credentials/oauthclient/"> to your list of redirect uris by selecting "Web client (auto created by Google Service)", and then adding "{window.location.host}/__auth/handler" to Authorized redirect URIs
16+
</a></li>
17+
<li>Open the Firebase Data Connect Extension</li>
18+
<li>Select your project</li>
19+
<li>Click "Start Emulators"</li>
20+
</ol>
21+
</div>
1822
</div>
1923
)
2024

dataconnect/app/vite.config.idx.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export default defineConfig({
1010
'@': path.resolve(__dirname, 'src'),
1111
},
1212
},
13+
publicDir: 'public',
1314
server: {
1415
proxy: {
1516
'/v1beta/projects': {

0 commit comments

Comments
 (0)