I am trying to add Discord OAuth2 to my Chrome extension so user can login by Discord account and it works fine. It opens new tab, lets user login and closes the tab. The problem is I do not know what should I put in redirect_uri so that after user clicks "authorize" it will go back to popup of my extension.
I tried this one (got it from a YT tutorial somewhere):
const redirectUri = encodeURIComponent(
"https://extensionId.chromiumapp.org/"
);
but it doesn't work. What is the url of popup in my extension? I know only its id.
Related
I'm using Stripe Connect Express accounts. Currently, I have a button that will generate a one-time link for a user to go to their dashboard, and I open the dashboard link in a new tab.
This can get blocked by popup blockers though-- if I instead redirect to it, is there a way I can add a back button (and maybe some additional branding) to the Express dashboard, so that the user can click to get back to my site?
Feature: login file
Scenario: sucess with login with credential
Given user launch chrome browser
When user open url "http://admin-demo.nopcommerce.com/login"
And user enter email "admin#yourstore.com" and password "admin"
And click on login dashboard
Then page title should be "Dashboard / nopCommerce administration"
When user click on logout
Then page title should be "Your store. Login"
And close browser
Scenario: search Customer By e-mail
Given user launch chrome browser
When user open url "http://admin-demo.nopcommerce.com/login"
And user enter email "admin#yourstore.com" and password "admin"
And click on login dashboard
Then page title should be "Dashboard / nopCommerce administration"
When user click on logout
Then page title should be "Your store. Login"
When user click on customer name
And click on customers menu item
And enter custome email
When click on search button
Then user should found email in the serach box
And close browser
The first scenario generated to glue code after spending hours. Then when I copied the first scenario to second scenario "search by email", the glue code was not generated for the additional steps in second scenario? I do not know what I am doing wrong?
Can anyone help me in resolving the error like why i am getting 400 BadRequest when i click on SignUp button which uses a SignInSignUp userflow.
Steps to produce this issue:
Open two same login pages in two different tabs.
After that enter credentials on first tab and clicked on signin button which uses the same
SignInSignUp userflow.
At the same time i clicked on SignUp button on second tab which leads to 400 BadRequest.
UserFlow Example
Screenshot Attached Below:
if you are using the same browser twice, once you sign in to the site, I'm pretty sure you get an auth token, with the associated cookie. your browser is now "logged in" so if you open a second same browser window or tab, and click sign up, it probably sees that you already have a logged in session cookie for that url and sends that and the server side is confused. I'm not quite sure why you would want to do that though.
if you need to I would probably open an incognito window when starting the browser for the second "load" of the site to ensure you're not sending the same cookie to the signup page.
I'm using Passport and Facebook Strategy for authentication. It works fine from within my website. Clicking the login button makes a get request to auth/facebook/ and I succesfully log in the user.
I have the same url in the app details:
However the App Center Visit Website button adds this to the query:
{ fb_source: 'appcenter',
fb_appcenter: '1',
code:xxxxx...., // this is what i want
}
And upon clicking i get this error:
"Error validating verification code. Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request"
What i don't get is that this works AT THE SAME time on my website. How do I handle this extra parameters and log in the user upon clicking on the visit website button?
I also posted another question. I've been dealing with this for a while now and can't get my head around it...
note:
As far as I know, it is required for app approval that the Visit Button authenticates the user upon clicking and doesn't prompt them with another login message.
I have a webapp that saves the credentials (user & pass) for a website B. Is it possible to click on a link in A and have that sign me into site B in a new browser window?
For example: say A has my pinterest user & pass. If I click on a link in A that says "sign into pinterest" can that open a new windows and let me start browsing pinterest as if I signed in?
This is possible if the site in question gives you some sort of interface (like OAuth) to do that. You cannot just submit data for the user in the other website's regular login form. (assuming they have some CSRF protection, which they should.)