Skip to content

1.0.0-rc1

Choose a tag to compare

@vonovak vonovak released this 27 Jun 22:37

This is the first release after the repo was moved to react-native-community. You may get it with

yarn add react-native-google-signin@next

With this RC, a lot has changed under the hood. In particular, both native modules were rewritten to use promises internally (before they were event-based). Also, the JS logic that previously lived in two files (one for each platform) were merged into one. These changes enabled to have cleaner code, fixed several bugs along the way and will ease future maintenance. We now hope the lib will be actively maintained and brought to a stable state.

Thanks to @AndreiCalazans and @jozan for helping to manage issues, coding and code reviews. Also thanks to @sibelius who facilitated the move under react-native-community.

Our aim with this RC was to keep breaking changes to a minimum and use this RC for the library users to upgrade easily and report potential bugs.

Since the internals of the library were, from a fair part, rewritten, it is not easy to enumerate all breaking changes. Let us instead describe each function that is exported from JS and its behavior:

  • configure: resolves to true or rejects with error (should require no changes to your code)
  • hasPlayServices: resolves to true or rejects with error (should require no changes to your code)
  • signOut: resolves to true or rejects with error (should require no changes to your code)
  • currentUserAsync: no changes
  • signIn: resolves to user info or rejects with error. In case use cancels the login flow, the rejection error object contains a code property with value CANCELED see readme
  • getAccessToken - no changes
  • revokeAccess - no changes

Please note that all rejection Errors have a code property that used to be a number but now is a string, as the rejections are handled with the RN's promise implementation where the code is a string, as seen here.

Also, please note that the package requires newer versions of its native dependencies, please consult the guides.