Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How to program with yii2 : google authentication?


Asked by Ariana Huffman on Dec 15, 2021 FAQ



So, my Authorized JavaScript origins will be http://localhost:8888 and Yii2 User requires the Authorized redirect URIs path of http://localhost:8888/hello/user/security/auth?authclient=google. You'll be presented with API keys, also known as a client ID and client secret:
Likewise,
For Yii2 User, we need to enable Google+ APIs. Click on APIs & auth > APIs and search for google+: You'll see a list of the Enabled APIs which now includes the Google+ API: Next, we need to add credentials so we can authenticate our API requests with Google for this project's activities.
Just so, However, these default methods are not very useful as they depend upon hard-coded values. For practical reasons, this system must use a database for user information storage and protect the passwords through hashtags. Another way of implementing user authentication in Yii2 is to use third-party extensions.
Moreover,
Yii is equipped with many security measures to help prevent your Web applications from attacks such as SQL injection, cross-site scripting (XSS), cross-site request forgery (CSRF), and cookie tampering. In this tutorial, I'll walk you through the basic security concepts within the Yii application framework.
Besides,
In Programming With Yii2: Getting Started, we set up Yii2 locally, built a Hello World application, set up a remote server, and used Github to deploy our code. In part two, we learned about Yii's implementation of its Model View Controller architecture and how to build web pages and forms that collect and validate data.