data-skeptic/webv3

AWS Amplify

Closed this issue · 1 comments

Add Google OAuth login just like on other sites. If the use authenticates, change the menu from saying "Login" to "My Account" with a pull down menu that has two options:

  1. My Profile
  2. Log out

Clicking on My Profile brings them to an empty page with a header "My Profile"

Afer looking through the oauth on our other projects, I've realized that it would be much more organized, as well as a lot easier to re-use, oauth if we just made it into it's own module to be required in our server-creation scripts.

I've got it working like this...

// ...express setup...
require( './api/google_oauth' )( app, {
  GoogleClientID: '...',
  GoogleClientSecret: '...',
  GoogleRedirectUri: '...',
});
// ...express routing setup...

Unfortunately it's getting to an "authority" error from Google when i attempt to use it.

I imagine that this is just something we can power through in a few minutes tomorrow in the office. After that, oauth will be working just fine and be re-usable in other projects very easily. (It also makes our server creation scripts look a LOT less cluttered, lol)