I write a rest api with yii2 and i am using oAuth2 , the problem is when user want login , client web application should send request to get token , request should contain client_id and secret_key and username and password in this case user can simply inspect element and click to network and see posted parameter to the server this means user can see client_id and secret_key. client_id and secret_key are signature for each application and server can find out witch application use api. how to handle this security issue?
1
There are 1 best solutions below
Related Questions in OAUTH-2.0
- discord.py - Oauth2 - join user to guild
- Implementing Incremental consent when using both application and delegated permissions
- Verifying Google Identity OAuth2 token with Ruby
- spring security error Caused by: org.attoparser.ParseException: Exception evaluating SpringEL expression: s
- Encountering HttpError 403 and 500 When Using Google Sheets API with Service Account
- get refresh token in axios interceptor
- spring error exception with oauth2 and securityconfig
- What oauth 2.0 endpoint is used to validate a bearer token
- Not enough permissions to access API request https://api.linkedin.com/v2/me
- How to specify the client ID and redirect URI in Swagger OAuth2.0 configuration for Swagger UI?
- OAuth2 PHP change invalid_token response
- Call Databricks API from an ASP.NET Core web application
- Secure to share Access Token over public API using CORs?
- How to use Oauth in order to log‑in on .googleapis.com on almost any arbitrary endpoints domains from the web browser?
- OAuth access token attribute based reverse proxying of http ressources
Related Questions in OAUTH2CLIENT
- Struggling to set up authentication using oauth2client
- Android publisher api encountered with 403 error
- Can a plain java code act as a OAuth 2.0 client and retrieve data
- Select an Oauth2 identity provider programmatically at runtime in Spring Security reactive
- Spring cloud gatewate as oauth2 client + React Front End. Problem Redirecting to login page after Refresh Token Expires
- Redirect URL Problem Using oauth2_client Package Flutter
- Generating Access Token through OAuth2 Returns Null in Flutter/Dart
- Protect a subset of endpoints using a different OAuth2 Client from the one used to log in a Spring Boot app
- iOS Google Sign In and Authenticating Token on Python Backend Not Working
- SOLVED: Keycloak + Spring Security OIDC Backchannel Logout: Unable to Trigger Redirect UI to Keycloak Login After SSO Session Max/ Idle
- Implement OIDC authorization code grant flow for AngularJS SPA
- Current Google Login Authorized redirect URIs how to fill exactly correct
- Generate access token for Oauth2 Authorization code grant type & consume the secured Rest API using spring boot using that access token
- How can I send e-mails from my GMail account using REST service?
- Spring OAuth2 Client - authorization code exchange fails
Related Questions in YII2-API
- Fetch users data with related clients data in Yiii2 api
- How to serve index.php from different directory through .htaccess?
- Unable to pass post variables in http request from Electron to Yii API
- Yii2 : Rest API return xml instead of json
- What is the best approach to implement multi language app using angular and yii2
- Get all attributes of extraFields in Yii2
- Creating migration history table "migration" Syntex error
- Override response of Rest authentication(HttpBearerAuth) in yii2
- Angular 7 http.post is sending null to yii2 API
- How to call rest API of Yii2 in Angular 7
- Yii2 Api - Using Oauth to authenticate user and website?
- Yii2-Api: How to pass Token for the HttpBearer Filter
- Yii2 - API Rest - ActiveDataProvider
- oAuth2 security issue with clinet_id and secret key : user can press inspect element and earn clinet_id and secret key
- Yii2 RESTful: Content Negotiation languages not work
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
It seems you have missed out one key element of OAuth 2.0, client type.
OAuth 2.0 defines two types of clients, public clients and confidentiatl clients.
2.1. Client Types
confidential
public
In your case, you seems to have a public client (user agent based application in broswer as it seems). In such case, you should set your client type to a public client. If this is not the case, you are not utilizing a proper back channel call from your web application.
Additionally, public clients which use authorization code flow can use PKCE to avoid authorization code theft attacks. Related RFC can be found from RFC7636