Para utilizar a funcionalidade de login com o Google Authentication no Scriptcase, é necessário ter o Google Identity Service previamente configurado e as chaves "ClientID" e "Secret" disponíveis para uso.

Neste artigo, aprenderemos como configurá-lo e obter essas chaves para utilizar na integração com o Google Authentication.

## Criando e configurando a Google Identity Service

1. Acesse o Google Cloud Console em: <https://console.cloud.google.com/>

2. No topo da tela, clique em "Selecionar Projeto" e escolha um projeto existente ou clique em "Novo Projeto":

![](https://help.scriptcase.net/galleryDocuments/edbsn6d100e9e8030321a324498734b2943c372b8582d5b12638473034e8d84da6e6f901b6fc29c07945b4e0f83fb6eb297e8?inline=true)

3. No menu lateral, acesse "APIs e serviços > Tela de permissão Oauth":

![Idea](https://static.zohocdn.com/zoho-desk-editor/static/images/lights.png/)

Se você já tiver o **cliente** **Oauth configurado**, pule para o passo 9.

![](https://help.scriptcase.net/galleryDocuments/edbsnc1d0797a16413360e79176671911d0a7977ebb6e1c79d446949db766a2308c67045bc6a5cacded42bac470383c1479ae?inline=true)

4. Clique em "Vamos começar":

![](https://help.scriptcase.net/galleryDocuments/edbsn09e38c9831d13751abaa1c7776280901fbbc1fdb4b7ac983be8d3df68493507e57b2a133d89110120558114e4ac50ed1?inline=true)

5. Em "Informações do app", defina o nome e um email para suporte. Após isso, clique em "Próxima":

![](https://help.scriptcase.net/galleryDocuments/edbsn4fa42dd50f5656c71d29395b00f2218e7fbc45e782540d82014d2ed282a58e6aabfccc227a912ea59fb6331ec9136b67?inline=true)

6. Em "Público", selecione "Externo":

![](https://help.scriptcase.net/galleryDocuments/edbsnc1d0797a16413360e79176671911d0a718ac94db9ccd07235f4a16bd832a2e730b331c436d218f1ecbbb67a48db62994?inline=true)

7. Em "Dados de contato", insira seu email e clique em "Próxima":

![](https://help.scriptcase.net/galleryDocuments/edbsncc90a09ecf784a3f3f5d419a304d7fb194e3f8c239ab068da893a884ded9f04f707ea856615d900aac7ed0797b94ed7b?inline=true)

8. Aceite os termos e clique em "Criar":

![](https://help.scriptcase.net/galleryDocuments/edbsn970db58c28989b2079eed331c0b8044dc7a91b76cbf9badf42f69b1b8f648863dfeadb28afbcc5d0605d7457170065fd?inline=true)

9. No menu lateral, vá para "APIs e serviços > Biblioteca":

![](https://help.scriptcase.net/galleryDocuments/edbsn970db58c28989b2079eed331c0b8044d2fd0654b32e2ad1d43c91ef8c86cc473d28e3066a78aac85df83aedb3a998889?inline=true)

10. Procure por "Cloud Identity" na barra de pesquisa e selecione-a:

![](https://help.scriptcase.net/galleryDocuments/edbsn0b0a383da5fdeb9500154bb959a752ab56072efff746193b3bb8679e089851c10f37fdb1fafaa57f17704cf558ed771a?inline=true)![](https://help.scriptcase.net/galleryDocuments/edbsn4c7fdbbaaa3dc814600a30dc81a70f0f0da3ea25957e16563b8d0c642de0ed8ac6d38ec8c790f5008e19f7b32841424d?inline=true)

11. Clique em "Ativar":

![](https://help.scriptcase.net/galleryDocuments/edbsnd4bdd7c6f2cb7c2ce72f13783bb1e4bc0e2082a7e326746a4a6ad07debce800a89535892958d94dc9f9bec1e99e6307a?inline=true)

12. Novamente em "APIs e serviços > Tela de permissão OAuth", vá até "Clientes > Criar cliente":

![](https://help.scriptcase.net/galleryDocuments/edbsn0c67f568f4cc8876f605750693bf44a7a5723cfee0a4ab2668afb4b796e5a2fc42eb2a3fb655b045ba0bc110d5099520?inline=true)

13. Em "Tipo de aplicativo", selecione a opção "Aplicativo da Web" e escolha um nome:

![](https://help.scriptcase.net/galleryDocuments/edbsn34f8cb3fce99f0152f949358aa556300ca922567efd82481d670e0a5591b7ea2d74e800d79bfb4b6a35394b148f94394?inline=true)

14. Em "URIs de redirecionamento autorizados", coloque seu domínio com o caminho até a aplicação que utilizará o Google Identity Platform e clique em "CRIAR":

![Info](https://static.zohocdn.com/zoho-desk-editor/static/images/info.png/)**app\_link\_social.php** é uma aplicação interna do módulo de segurança e serve para vincular o login do sistema com a conta do google.

![](https://help.scriptcase.net/galleryDocuments/edbsn53df8b9d4b2415daf7f9f5f0717fc9402385317d603aec2f373045b50eb62a0adc98896107e820b35e7a9bf37835cd6f?inline=true)

15. Agora, basta clicar no botão de download para visualizar a "ClientID" e a "Secret":

![](https://help.scriptcase.net/galleryDocuments/edbsn6ab2c9a045b9450426ec9105dc0a67130b987ef54a615649dcf18f0058568c330406958de179bcfe073b48b1d07953f8?inline=true)

## Conclusão

Neste artigo, aprendemos como criar e configurar o Google identity Service para ser utilizada posteriormente no Scriptcase através do Google Authentication. Para saber como configurar e utilizar essa função no Scriptcase, leia o tutorial de integração com o Google Authentication.

Abraços e até mais!