-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google Search Console API O-Auth from Settings #80
Comments
hi, ja, wäre super, hiermit beauftragt, ruf mich an falls fragen gibt. idee ist dass ich mich via oauth2.0. in den settings bei google search console, google analytics anmelden kann. dann zugriff auf den oauth token von den regeln aus (globals) dann regeln schreiben die die den oauth token verwenden können . bitte auch eine dummy regel schreiben als proove of concept. |
Erste Implementierung sollte funktionieren inkl. Beispiel-Rule (https://github.com/franzenzenhofer/f19n-obtrusive-livetest/blob/master/src/public/default-rules/google-api-token.js). Es ist allerdings so, dass wir in der App (Google Console) die Extension-ID angeben müssen. Ich muss noch checken, ob sich diese ID eh nicht ändert und wenn doch, müssten wir die ID fixieren. Ich gebe dir diesbezüglich noch bescheid was von deiner Seite dann zu tun wäre. Sofern bei dir die Extension-ID im development modus folgende ist |
hi bei 'nen click mit "sign in with google" bekomme ich i found this online |
@franzenzenhofer Hab jetzt einen fixen public key im manifest gesetzt. Sollte zur folge haben, dass die Extension beim Entwickeln immer die selbe ID bekommt ( Habe die ID auch entsprechend bei der App eingetragen. Außerdem habe ich zwecks sauberer Trennung eine eigene App für Development (DEV) angelegt. |
frage: funkt das dann auch in der fertigen gebuildeten app nach den rollout via appstore? |
|
Oauth Works now. If it's successfully conneceted please add a checkmark next to the headline: Connect with Google ✅ |
will write first rule today at night for further testing |
hi @neuling i'm struggling to make the API requests work i get this console output (background.html) this is the same error response as if i do not give an KEY value test case i gave you access to this domain in google search console to your email ([email protected]) so you can test |
@franzenzenhofer I just figured out you need to send the access_token via Authorization header instead of key URL param. I changed the rule and from what i can see the rules works now. |
hi, it works great until it doesn't. i often get an http 401 - invalid token. then i need to disconnect - connect again and it works great again. here are some hints why this happens i also can confirm it happens when i change network (and with this prop my ip and with this the token is imvalidl is there a way to prevent this token invalidation - or - to automate the connect/disconnect dance? either on an event, regularly or a method / message i can ise from the rules? |
Got it. Will find a solution for this problem. |
hi moritz, would be awesome if we could finish this in the near future so we can focus on that other project |
ping @neuling |
Sorry, I am on it … update soon. |
@franzenzenhofer Pls pull and test it again. I will check for a fresh accessToken before the rules get executed. |
it should be possible to access the
Google Search Console API (https://developers.google.com/apis-explorer/#p/webmasters/v3/ )
Google Analytics API (https://developers.google.com/analytics/devguides/reporting/core/v4/ )
from the rules
for this we need an OAuth 2 Token
GSC: https://developers.google.com/webmaster-tools/search-console-api-original/v3/how-tos/authorizing
GA: https://developers.google.com/analytics/devguides/reporting/core/v4/authorization
(read only access it enough)
on the "Settings" Section it should be able to start the authentiaction. the OAuth Verification Section should before the rules.
in the context of the rules the oauth token shoud be available as someting like
context.tokens.google_search_console
context.tokens.google_analytics
please implement some sample rules that show the access to these APIs
(in the application the code should be implmented in a way that it is relatively easy to add other oauth verifcation pathns in the future )
The text was updated successfully, but these errors were encountered: