Skip to main content

daravel_google 1.25.0 copy "daravel_google: ^1.25.0" to clipboard
daravel_google: ^1.25.0 copied to clipboard

Google for Daravel. OAuth 2.0 user tokens with refresh, service accounts (RS256 JWT, RFC 7523) and Google Calendar v3 with attendees and Google Meet links.

Daravel

daravel_google #

English · Bahasa Indonesia

Google for Daravel: OAuth 2.0 user tokens that refresh themselves, service accounts (RS256 JWT, RFC 7523) and Google Calendar v3 with guests and Google Meet links. Tokens are stored in google/apiclient's JSON, so a Laravel and a Daravel application can share them.

dart pub add daravel_google
Application.configure(basePath: '.').withGoogle() // GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, ...

// A user's calendar, with the token stored at sign-in (refreshed when needed).
final calendar = Google.calendarFor(
  GoogleToken.parse(user.googleCred!),
  onRefresh: (fresh) async {
    user.googleCred = fresh.encode();
    await user.save();
  },
);

final event = await calendar.create(CalendarEvent(
  summary: 'Matematika XI',
  start: EventTime(DateTime(2026, 10, 28, 7, 30)), // in APP_TIMEZONE
  end: EventTime(DateTime(2026, 10, 28, 9)),
  attendees: [EventAttendee('siswa@sekolah.sch.id', displayName: 'Siswa')],
  meet: true,
));
print(event.meetUrl);
  • GoogleOAuth: the consent URL (offline access), the code exchange, refresh and revoke; concurrent refreshes share one.
  • GoogleServiceAccount: the key file, an RS256 assertion (checked byte for byte against OpenSSL), domain-wide delegation with subject.
  • GoogleCalendar: create, get, list (every page), patch, replace and delete events; GoogleException carries Google's status and reason.

Documentation: https://github.com/daravel-dev/daravel/blob/main/docs/guide/google.md.

License and trademarks #

MIT. "Laravel" is a trademark of Laravel Holdings Inc.; "Dart", "Google", "Google Calendar" and "Google Meet" are trademarks of Google LLC. Daravel is an independent project, not affiliated with or endorsed by any of them.

0
likes
160
points
652
downloads

Documentation

Documentation
API reference

Publisher

verified publisherframework.daravel.dev

Weekly Downloads

Google for Daravel. OAuth 2.0 user tokens with refresh, service accounts (RS256 JWT, RFC 7523) and Google Calendar v3 with attendees and Google Meet links.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#google #calendar #oauth #server #backend

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

daravel, pointycastle

More

Packages that depend on daravel_google