mitul45/expense-manager

how to deploy this on your own website.

Closed this issue · 12 comments

i give a try to upload this code on my website but it shows loading no login page.

I'm not sure what do you mean by "try to upload this code on my website", can you provide some more details?

To use the app – clone the expense sheet, visit: https://mitul45.github.io/expense-manager/, and log in with your Google account.

I'm trying to host this repository on my website. Just for personal use. So what I've done to host this repo on my site.

  1. I just cloned this repo.
  2. changed the CLIENT_ID from init.js and put my own Google Sheets client ID
    No login button appears. Just showing loading gif

I just wanna know that can i host this (https://mitul45.github.io/expense-manager/)[https://mitul45.github.io/expense-manager/] on my website too ?

Ideally, that should be sufficient, are you getting any errors on the console?

i think problem is here.

image

Did you find a solution to this? @nk932714

I'm having the same issue:
It shows not a valid origin:

{
    error: "idpiframe_initialization_failed", 
    details: "Not a valid origin for the client: https://wasi001…itelist this origin for your project's client ID."
}

nope i haven't find any solution for this. @wasi0013

cirio commented

What's the command to build the project? Where is the output to upload on my host?
I changed CLIENT_ID in init.js and start index.html, but I've the same issue of others users.

Hey everyone, sorry for the long delay in response.

So as I understand, you want to deploy this to some other static server, right? It should be doable by just copying everything from here and changing the CLIENT_ID in init.js. There is no build step it's all vanilla HTML/JS/CSS.

@nk932714 where did you get CLIENT_ID from? Also, note – it's not same as the Sheet ID.

cirio commented

@mitul45 It's ok, it's working

@wasi0013 have you add your hosting site in your allowed list for your project? You can do in google developer console. Also remember to add API to google Drive

@cirio @mitul45

  1. Can you please explain about CLIENT_ID, Where i can get that if it is not Sheet ID
  2. Where to add API to Google Drive ?
  3. What do you mean - "add your hosting site in your allowed list for your project"
cirio commented

@MeenachiSundaram :

  1. You can find CLIENT_ID in your google developer console. After creating a project, on the credential panel, you can take a new client id (LINK)
  1. At the same place, in your google developer console. On the API & service tab, you can add a Google Sheets API and Google Drive API.

  2. You can use Github or your custom domain as a hosting for your web site, so you need to add a new whished domain. (LINK)

let me know if I can help you