has anyone implemented the GSC API in their Wasp project?

Any idea if I should add the Google Search Console scope to my regular oAuth or setup up entirely new credentials and consent screen for when someone wants to connect properties? The idea of the app is it pulls in your GSC data each day so you can visualize GSC data for multiple sites using custom filtering. Have the frontend built out but can't figure out GSC connection...
3 Replies
kapa.ai
kapa.ai2mo ago
Hi @Billy Howell. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. The knowledge sources provided do not contain specific information about implementing the Google Search Console (GSC) API in a Wasp project. However, Wasp does support Google Authentication out of the box, which might be a starting point for your project. You can set up Google Authentication by creating a Google OAuth App and providing Wasp with your client key and secret. You can also define the scopes you need for your app in the getConfig() function in src/auth/google.ts file. If the GSC API requires additional scopes, you might be able to add them there. Here are the steps to set up Google Authentication in Wasp: Setting up Google Auth (https://wasp-lang.dev/docs/auth/social-auth/google#3-creating-a-google-oauth-app) And here is how you can use the data received from Google: Using the Data Received From Google (https://wasp-lang.dev/docs/auth/social-auth/google#using-the-data-received-from-google) Please note that this is a general guide for setting up Google Authentication and might not cover all the specifics needed for implementing the GSC API. For more detailed information, you might want to check the official GSC API documentation or ask in the Wasp community. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Billy Howell, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
miho
miho2mo ago
If I understood correctly, people would log in with Google and then you could use their Google API token to fetch stuff on their behalf? Relevant docs: - Setting up Google auth https://wasp-lang.dev/docs/auth/social-auth/google - Setting up onAfterSignup hook where you can get the token: https://wasp-lang.dev/docs/auth/auth-hooks#executing-code-after-the-user-signs-up
Google | Wasp
Wasp supports Google Authentication out of the box.
Auth Hooks | Wasp
Auth hooks allow you to "hook into" the auth process at various stages and run your custom code. For example, if you want to forbid certain emails from signing up, or if you wish to send a welcome email to the user after they sign up, auth hooks are the way to go.
Billy Howell
Billy Howell2mo ago
thank you sir! I think onAfterSignup is what I was looking for
Want results from more Discord servers?
Add your server