![]() ![]() Return to the Google API Console and click “Library” in the side menu. env file.Īnytime you want to use a scope in the Google API, you need to enable the corresponding API service in the Google API Console. Once you have all three pieces of authentication information, add them, along with your app redirect URL, to your Laravel. If you don’t see the server key or client ID listed on the Credentials page, you’ll need to create them using the blue “Create Credentials” button. The server key and client ID can both be found under the “Credentials” link in the sidebar of the Google API Console. Your app secret will be provided when you create your app in the Google API Console. ![]() Once you have an app created in the Google API Console, you’ll need to create or locate three pieces of authentication information: a Google server key, a client ID, and an app secret. Look for the “Create Project” link in the submenu at the top of the page to get started. Create an Application in the Google API Consoleīecause our app will be a using Google for authentication and as a data resource, you must create an app in the Google API Console. If you haven’t done that, please refer to the Socialite documentation on GitHub. In this post, I’ll show you how I was able to query a list of contacts from Google’s People API and keep using Socialite.Īs you progress through this post, it is assumed you have Laravel and Laravel Socialite installed. While I needed users to log in, I also needed to get a list of their Google Contacts. Socialite is one of Laravel’s official packages, but it is clear it only handles user authentication, making its use not as dynamic as I had hoped it would be. When I start a project that requires users to log in using their Google accounts, I immediately turned to Laravel Socialite. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |