Skip to content

Instantly share code, notes, and snippets.

View SumitGA's full-sized avatar
💯
Back to Work

Sumit SumitGA

💯
Back to Work
View GitHub Profile

Adding Google Sign In With Rails and React

For this blog post we will be using ruby version 2.4.0 and rails version 5.1.4 as backend and React/Redux as frontend. Adding Google Sign in functionality in your application can be done in two popular ways.

  • Adding google sign in functionality in the frontend with google api client gapi.

  • Adding google sign in functionality logic in the backend server.

If your application has separate backendend with APIs feeding data to the frontend React application, I suggest you to follow the step 2. If you want yo enhance your application security, then you implement both.

/*
*
* A simple S3 library written because the other implementation doesn't meet needs and is outdated.
*
* What this library is good for:
*
* ** Can send files any size (although S3 is currently limited at 5 gigs)
* ** Streams files from disk to socket -- minimal memory footprint and very efficient
* ** Uses sockets to support 100 Continue (especially usefull for large files)
* - the body is only sent after amazon approves the signed header