sdoomz / react-google-picker

Google Picker for React
MIT License
45 stars 46 forks source link

onAuthenticate #7

Closed phbernard closed 6 years ago

phbernard commented 6 years ago

Beyond file selection, the oauth token is useful, for example for file download.

Currently, there is no way to get the token, as react-google-picker keeps it as a private var. The only workaround I found was to override createPicker. However, this is not the right solution, as it forces you to rewrite the whole picker creation when you only wanted a piece of information.

With onAuthenticate, you get a simple and convenient way to get the token.

sdoomz commented 6 years ago

@phbernard Thanks a lot for your improvement. Could you please remove dist from PR and resolve conflicts? After that I'll be able to merge your code

phbernard commented 6 years ago

Damn! I didn't realize you were going to get this last commit. It was intended to be more or less "private".

Alright, dist gone again, and React.PropTypes vs PropTypes merged.

sdoomz commented 6 years ago

@phbernard it happens when you'r doing git push 😄