BigCommerce App Flow - BC to my service and vise versa - bigcommerce

I am trying to clarify I understand the flow of BigCommerce authentication. This is what I understand I need to build:
BigCommerce to my service:
1.User clicks to install my app.
2. He approves the OAuth access to his account and then BigCommerce redirects to my app's callback URL.
3. My app should take in token and store credentials and assign it to a user in my system.
4. User is redirected to an installation page hosted on my end and I instruct him to install.
How does the other way around work? If user is exposed to the ability to use my service on BigCommerce on my website? Can I invoke the BigCommerce Oauth and operate the same as the process described above?
Moreover, is the process above correct?

Related

Implementation Of SSO On Shopify For Existing Platform Users

I have a website and app(iOS/Android) where people can come and register and use my product.
We are now launching eCommerce on shopify and want that
existing users should be able to use their credential on shopify
If user is already logged in on the platform and navigate to shop then they should not required to login again.
If user directly come on shop and login then the same should be continue while using the platform.
Now I am looking for the following
Best plugin or third party integration
If anyone has built their own SSO or if there is any code available to implement the same without plugin.

How to authenticate with an external 3rd party API from a single page Nuxt application over oauth?

I have a Nuxt application that interacts with NationBuilder, a 3rd party application. In order for users on my site to interact with data from their NationBuilder account, my app must allow them to authenticate over OAuth with the NationBuilder API.
The first step of this OAuth process works fine; My client sends a request to the NationBuilder API's /oauth/authorize endpoint. The browser redirects the user to NationBuilder's website where the user can login to grant my application access to their NationBuilder data. Then, NationBuilder redirects the user back to a second page on my site with query parameter in the URL containing what is called the "code". This second page on my site hits our internal API with this code, which in turn hits the Nationbuilder API's /oauth/token endpoint with the code to receive the access_token. Now we can use this access_token in any call to the Nationbuilder API.
The issue I'm running into is that when Nationbuilder first redirects the user to that second page in our Nuxt app, the reloading of my site takes a while and seems to be skipping some initialization configuration steps. I think this is the case because some of the functions that normally work when I boot up my site are not found.
I am in the process of developing the application, so I am running my site on localhost and using ngrok to create an https tunnel to satisfy the NationBuilder API. Maybe this issue is related to the tunneling?
I have a hunch I should be doing this all differently. If there is a conventional way of authenticating a Nuxt application with a 3rd party application over OAuth, please point me to an example/docs.
Cheers.

How to get authorization code in BigCommerce to generate access token once the app is already installed in a store

I am providing an integration to BigCommerce from our website.
I see that the auth url is called with the authorization code when app is first installed. I need to know how I can generate the authorization code with an app already installed.
I need it because there's a case where the user removes the integration from our website but our app is still installed in his store in BigCommerce. I want to show something like a 'connect' button which the user can click to generate a new access token and connect his store to our website.
I understand that I can reuse the same access token that he had before he removed the integration, but then what if the user connects a second account in our website to his BigCommerce store. In this case the access token will need to be passed between two different accounts in our website and will be an issue.
An app should only connect to a store actively, in a process that will install the app. If you're offering the ability to disable the integration outside of BigCommerce, the app should be uninstalled at the same time from the store. The same OAuth token is required to authorize any API requests for the app, which is why it needs to be stored after installation.

Unable to get context part in Bigcommerce auth callback request

I am working with Bigcommerce api using oauth. I am currently in development phase. I have given auth callback url as
http://localhost:3000/resource_callback.
I am unable to get store hash in context. It is only sending scope, and code. What am I missing here? Just using http instead of https is the reason? Please help me with proper direction.
If you are receiving the Auth Callback Request but it only has code and scope query properties then the problem is how you are installing your app. At this time it is necessary to install an app directly through your store's Control Panel, rather than using a link to do the install (as is common with most oAuth implementations). The use of a link for the install is something that will likely be added in the future but oAuth on BC right now is geared towards public applications installed through the store.
That being said, it is possible to make oAuth credentials for a store even without making it a public application. Please follow the long answer seen on this question:
Can BigCommerce Private Apps use OAuth
This will cover the full process for generating oAuth API tokens from registering an app to installing into a store and beyond. Based on your question you should start at the Generate the Auth Callback Request section. If you follow the steps there then your Auth Callback Request will include the context property as well as the other two.
Update
You can now generate oAuth tokens in a store from Advanced Settings > API Accounts. As a result it is no longer necessary to install a draft app into a store for the sole purpose of generating oAuth tokens. You will still want to do this if you are developing an app for the BC App marketplace or developing a user interface for your app that you want to live in the Control Panel of the store.
Just went through the same thing. See here: Bigcommerce Authentication code. Let me know if you need more details. SSL is mandatory.

Desire2Learn Valence authentication with Shibboleth

My team is getting started with Desire2Learn Valence, and our Shibboleth authentication seems to be derailing the initial API Key authentication process.
We have our App ID and Key, but the Valence authentication form is sending us to our Shib login (not our direct login, as it does for the "Lake Valley University" sample) and it never makes it back to Valence to complete the process.
Any suggestions on how to configure or change this so it works?
Valence authentication is based on deep-linking (ultimately the Valence Authentication page directs the user back to the app with some key information attached).
Therefore, the LMS' authentication system has to be configured for deep-linking, which occasionally is not true for some systems. Also there are particular versions of the shibboleth authentication system required to support that deep-linking.
The Valence authentication process flow follows the links the deployment team (or site administrator) provides in the DOME for Tools.Login.OrgLoginPath and Tools.Login.OrgMobileLoginPath. This will be why you are going to the Shib page instead of the built-in page. Some Shibboleth customers create a portal page to give users a prompt and choice of which system to authenticate against. All the pages in the process have to pass along the deep-linking url as the ?target= query parameter.
As it is not returning to the app this suggests it needs an updated version of the Shib product (IPAS). I would open a help desk ticket for this item and refer to the fact that you are doing this for using it with Desire2Learn Valence authentication.