During BigCommerce App registration the Auth Callback URI, Load Callback URI and Uninstall Callback URI should be provided.
After registering the app can I change the URIs before App submission?
Yes, you can change URIs before app submission. It may require you to reinstall the app on any store where you might've been testing it.
Related
In my react app i added a button that redirects to the login page url. In my backend login page i used passport.js to make discord oauth and then redirect to an callback page where i have a simple rendered page who said is logged in successfuly, now he can return to the app. After that, in my frontend i added a button where it sends a axios post request with credentials and it says its unauthorized, so in few steps i need to use the same cookie from the web page i logged and need to access that from my react app.
BTW. i already use cors in my backend and i watched some tutorials but cant find a solution for that. Thanks in advice
I am running into an issue between react native and the endpoint I have setup for the redirect_uri. For the process flow, currently the user is taken from the app to the browser where the fitbit authorization page appears. So far so good. The user selects the permissions that want to allow and from here the redirect_uri points to an express endpoint that saves the information into a database. After this step I would like to redirect the user back to the react native app to continue, instead it just displays the success message that comes from the endpoint in the mobile browser. How can I redirect the user back to the application once the endpoint has finished processing?
What you're asking about is called deep linking.
To open your native app from a browser:
Your native app needs to define a URL scheme that other apps can use to target it.
Your browser-based code needs to redirect to a URL using your app's scheme.
And, most likely:
Your app needs a listener for the deep-link. If you don't write a listener, your app will open, but there would be no way for you to pass information into the app from your browser-based code.
Here is a crude example, as a starting point. I would encourage you to go read the docs thoroughly, because deep-linking is a lot more complicated than first glance. :)
React Native
First, create the my-excellent-app:// scheme for your app as explained here. If you're using Expo, this becomes even easier.
Then, add the listener as early as possible in the life-cycle. Like most of the documentation on this explains – usually in your top-most component in App.js or index.js.
import { Linking } from 'react-native';
import URL from 'url-parse';
// Make sure to only add this listener once!
// Adding it more than once will trigger the handler more than once. ;)
Linking.addEventListener('url', ({ url }) => {
const deeplink = URL(url, true);
console.log(deeplink.query);
});
Web-stuff
I'm not sure exactly what tech stack you're using, but the concept is simple enough: do whatever you need to do on the server, and then redirect the browser back to your app's custom scheme.
In Express, that would be something like:
res.redirect('my-excellent-app://myCustomLink?other=data&using=UrlParamsGoesHere');
Lastly, there are third parties like Branch that also handle quite a lot of this, and more.
I want to add payment system to my application. I read a documentation and they said that after payment they will send request to my URL. What URL is it, how to send request to my app
It it probably the URL of you backend.
Then you should handle the part where your backend send the response (success, failure etc...) back to your app
I’ve been using Auth0 in my React web app. I also have a rule that works with new user sign ups. In my web (React) app, I use the Lock library and everything works fine.
Now, I created a React Native mobile app and because I have a custom login/sign up UI, I had to use the API method as opposed to using an Auth0 library such as Lock, etc.
My SignUp API calls work fine and create new users but my rule is NOT working with API calls. I checked to see if rules apply only to my web app but I don’t see any setting for that so I assume all rules should work for all apps that appear on my dashboard – including my new React Native mobile app.
The rule I created on Auth0 creates and assigns a new my_app_id to the new user. This rule has worked flawlessly with all sign ups coming from my web app which uses the Lock library but it doesn't seem to be firing when a new sign up comes in through the sign up API end point.
Is there anything I need to do so that my rule will work with my API calls?
Rules only run after a successful authentication event. This would not include a successful signup endpoint call, where no credentials are authenticated.
The recommended way to hook to a signup would be through a registration hook.
Beginner programmer here. I am trying for third party app development from Smartsheet api in React Native. Just following OAuth flow which is mentioned here http://smartsheet-platform.github.io/api-docs/?javascript#third-party-app-development
Here is the request which i need to send "GET https://app.smartsheet.com/b/authorize"
And params with it are following:
response_type: 'code',
client_id: '1samp48lel5for68you',
redirect_uri: 'http://localhost:3000/callback' (But i don't know what will be for my React Native app.),
scope: 'CREATE_SHEETS WRITE_SHEETS',
So my question is what will be redirect_uri for my app ? If i use any dummy web callback uri it gives me error of invalid uri. I want to request for an Authorization Code from that api.
Please help me out i have already spent so many hours to solve this issue but in vain.
Thanks in advance.
Setting up an application for the Smartsheet OAuth flow requires providing an HTTPS URL for the APP redirect URL when registering the app. For this you can setup an OAuth server (using Node.js & Express possibly) to do all of the authentication work. Then your mobile app talks to that server to trigger the authentication process. This server could also be used to do all of the interaction with the Smartsheet API itself. Then your mobile app talks to this server to get the data it needs from Smartsheet.