Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User needs to login after page refresh in order to add event #85

Open
aniketkambli opened this issue Jun 20, 2022 · 13 comments
Open

User needs to login after page refresh in order to add event #85

aniketkambli opened this issue Jun 20, 2022 · 13 comments

Comments

@aniketkambli
Copy link

The example is working fine but when i refresh the page, the google's session is not stored in browser and hence the user has to login again and provide consent before adding an event or else it throws error

@aniketkambli
Copy link
Author

Also how to create events with custom start/end time and start/end date

@Kubessandra
Copy link
Owner

  /**
    * Create calendar event
    * @param {string} CalendarId for the event by default use 'primary'.
    * @param {object} Event with start and end dateTime
    * @param {string} sendUpdates Acceptable values are: "all", "externalOnly", "none"
    * @returns {any} Promise on the event.
    */
   public createEvent(event: object, calendarId: string = this.calendar, sendUpdates: string = 'none',): any {

With this method you can use a start and end dateTime.

For the login issue, this was introduced with the new API of google where they do not manage the session state anymore.
I havn't found the time to find a solution yet.

@aniketkambli
Copy link
Author

okay cool, let me know once you find a workaround for session persistence. Other than that great work on the package 👍

@MatiasZelayaDept
Copy link

Hi ! Any news about this issue? I have the same problem

@udaniketk
Copy link

Nah, still stuck on the same problem. Let me know if you find a workaround

@Kubessandra
Copy link
Owner

I havn't found the time to find a workaround with google yet..

@MatiasZelayaDept
Copy link

Maybe you can made a method to return the token and the refresh token and the user can handle that outside the library

@Kubessandra
Copy link
Owner

You already have access to it by using apiCalendar.tokenClient

https://developers.google.com/identity/oauth2/web/guides/use-token-model

@MatiasZelayaDept
Copy link

The token client dont have the information about the token, only the info about the user, and doesnt have the refresh token either

@JanderSilv
Copy link

Any updates on this issue?

@UsamaEjaz0
Copy link

Any updates

@gabrielpagotto
Copy link

Any updates about this issue?

@Kubessandra
Copy link
Owner

Did not find the solution with the new Google API, if you have any idea, we can try to do a PR, but yes this is really annoying

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants