====== Configuración de dokuwiki con acceso OAuth ======
- Abra [[https://cloud.google.com/console/project|Google Developer Console]] en el navegador y ingrese con las credenciales de su cuenta.
- Click **Create project...** (you may see the page like this http://snag.gy/MZaOh.jpg).{{:personas:brolin:2019-06-02-191917_682x108_scrot.png?400|}}
- Fill new project form, give some name and project ID (see http://snag.gy/Ipmxr.jpg).
* :!: Google may ask you to confirm you contact phone with SMS or callback. "Evil Corporation" define their own rules. It's up to you to decide :) {{:personas:brolin:2019-06-02-194914_569x497_scrot.png?400|}}
- Open menu **APIs & auth** -> **Credentials** (see http://snag.gy/ZuLfU.jpg) {{:personas:brolin:2019-06-02-195139_429x414_scrot.png?400|}}
- Form "**Create Client ID**" will be opened. Fill it:
* **Application type:** (required) choose "Web application";
* **Authorized JavaScript Origins** enter your hostname (make sure http or https is the same for both settings). For example: http://www.your-domain.com
* **Authorized Redirect URIs** enter these lines:
http://www.your-domain.com/doku.php?id=start&do=login
http://www.your-domain.com/start?do=login
http://your-domain.com/doku.php?id=start&do=login
http://your-domain.com/start?do=login
http://www.your-domain.com/doku.php/start?do=login
http://your-domain.com/doku.php/start?do=login
Instead of "your-domain" put your actual hostname where DokuWiki is installed. :!: **Note:** if your DokuWiki is accesed with HTTPS then enter the URI with **https**, not **http**. {{:personas:brolin:2019-06-02-195350_825x431_scrot.png?600|}} {{:personas:brolin:2019-06-02-195615_707x732_scrot.png?600|}}
- Click "Create client ID" button.
- Now you have page with all required information for plugin setup. You will need two values from here: **Client ID** and **Client secret**.
- Open menu **APIs & auth** -> **Consent screen**.
- Validar dominio {{:personas:brolin:2019-06-02-195810_828x331_scrot.png?600|}}{{:personas:brolin:2019-06-02-195951_999x562_scrot.png?600|}}
- Fill "PRODUCT NAME" and e-mail address as well, or you can get this error http://stackoverflow.com/questions/18677244/error-invalid-client-no-application-name.
===== Enlaces =====
* https://www.dokuwiki.org/auth
* https://developers.google.com/identity/protocols/OAuth2UserAgent?hl=es
* El plugin instalado -> https://www.dokuwiki.org/plugin:oauth
* Se configuró como se explica acá -> https://www.dokuwiki.org/plugin:authgoogle
* https://support.google.com/webmasters/answer/9008080?authuser=2&authuser=2&authuser=2&visit_id=636945871649970892-4181131069&rd=2