Reputation: 61
I created a security integration as below
create security integration testSecurityInt
type = oauth
enabled = true
oauth_client = custom
oauth_client_type = 'confidential'
oauth_redirect_uri = 'https://xxxx-1.snowflakecomputing.com'
oauth_issue_refresh_tokens = true
oauth_refresh_token_validity = 7776000
The authorize endpoint is :
https://xxxx.snowflakecomputing.com/oauth/authorize
I altered user test01 to add delegation
ALTER USER TEST01 ADD DELEGATED AUTHORIZATION
OF ROLE TEST
TO SECURITY INTEGRATION testSecurityInt;
Next I'm trying to authorize using web browser
https://xxxx.us-east-1.snowflakecomputing.com/oauth/authorize?client_id=xxxxx=&response_type=code&redirect_uri=https://xxxx.us-east-1.snowflakecomputing.com
After giving proper TEST01 credentials its giving the error invalid consent request
Upvotes: 3
Views: 2196
Reputation: 61
Downloaded postman and went to Authorization section from the drop-down choose OAuth 2.0 and gave all the required inputs used Client Authentication as Basic Auth header and I generated token successfully
Upvotes: 2
Reputation: 51
Can you check if you are passing the client id and redirect URI parameters in the URL encoded form?
For example, If your authorization endpoint is https://.snowflakecomputing.com/oauth/authorize. Then you need to add the query parameters like client_id,response_type,redirect_uri to the above authorization endpoint. So your URL should look like below-
https://.snowflakecomputing.com/oauth/authorize?client_id=&response_type=code&redirect_uri= You can refer the below document for more details. https://docs.snowflake.net/manuals/user-guide/oauth-custom.html#authorization-endpoint
Upvotes: 0