Here is an example of how you can create a Google login in JavaScript using the Google Sign-In API:
Create a Google API Console project and configure the Google Sign-In API: Go to the Google API Console (https://console.developers.google.com/), create a new project, and enable the Google Sign-In API.
Get the API key: After enabling the API, go to the Credentials page and get the API key.
Include the Google Sign-In API in your HTML file: Add the following code to the head of your HTML file to include the Google Sign-In API:
This is just a basic example of how you can create a Google login in JavaScript. You can expand on this code to add more functionality, such as sending the user's information to your backend or redirecting the user to a different page after a successful sign-in.