我找到了这个(github) google auth 的 html 起始页,我想将其制作成 astro 组件。我想将其转换为.astro文件,并能够从后端传递 CLIENT_ID 和 API_KEY 的变量。我
这是来自谷歌的 HTML 代码:
<!DOCTYPE html>
<html>
<head>
<title>Google Calendar API Quickstart</title>
<meta charset="utf-8" />
</head>
<body>
<p>Google Calendar API Quickstart</p>
<!--Add buttons to initiate auth sequence and sign out-->
<button id="authorize_button" onclick="handleAuthClick()">Authorize</button>
<button id="signout_button" onclick="handleSignoutClick()">Sign Out</button>
<pre id="content" style="white-space: pre-wrap;"></pre>
<script type="text/javascript">
/* exported gapiLoaded */
/* exported gisLoaded */
/* exported handleAuthClick */
/* exported handleSignoutClick */
// TODO(developer): Set to …Run Code Online (Sandbox Code Playgroud) astrojs ×1