Hi All, I am new to Ory so please mind the lack kn...
# ory-network
Hi All, I am new to Ory so please mind the lack knowledge. I am currently testing out Ory Cloud and would like to use it to authenticate my users on a mobile app developed in Appgyver (https://www.appgyver.com/). You might ask, what is a No-Coder doing here..... 😄 I am a software developer, just developing an app for a client in their no-code platform 😉 Backround: Under the hood Appgyver uses React Native. So esentially you can have the same app run in the browser, android and ios. All is great but their build-in authentication is a bit limiting. I would like to use Ory Cloud for authentication. One main goal is to also allow users to sign in and have a token that only expires after say 7 days ( or some configurabel number ). The reason is, field workers will use the app that do not have internet connectivity for long periods of time. The Problem: When I do HTTP requests to the Kratos endpoints, I get an obvious CORS error as I am testing it from my browser. Questions: 1. What is the fastest way to get a dev setup going between Appgyver (host) and Ory Cloud? Ory Proxy or OAuthkeepr? 2. Where would one configure the expiry of the tokens? Thank you in advance for your time and effrot.
Hi @User Welcome to Ory! 😁 I would need to take a look at appgyver, but basically you would need to run the Ory proxy in front of your react app or add your domain to your Ory project. See the resources to our docs below. We don't have a setting on the cloud (yet) for setting the expiry of the session cookie/token. We are working on it though, and it will be configurable quite soon 🙂 https://www.ory.sh/docs/guides/proxy#ory-proxy-for-production https://www.ory.sh/docs/guides/custom-domains
Alano was faster 😄 But I meant to say the same thing.
😉 1
Hi @User, thanks for the feedback. For a browser based application I guess the proxy makes sense. I will try to set it up. Would I also need a proxy for a React Native app? Here I would have no domain, and there I assume I would be calling the APIs directly correct? Last question regardign the proxy. As mentioned in the document, the command to the ory clis would looks omething like this:
ory proxy <http://localhost:3000>
Here I assume I have some code running om my local host accepting traffic at port 3000, which I then rout to the custom domain. How would this look like for Appgyver (custom doamin) and Ory Cloud API endpoints? I assume I need to run the proxy somewhere ( a VM, container, etc. ) Then in appgyver, I need to point to my proxy instead of pointing directly to the Ory API endpoints. As I run the proxy, I could allow CORS and then just forward the calls to the Ory API endpoints correct?
Hi @User to be more specific: The end goal is to use appgyver to create a mobile ( React Native App ). It is also possible to test the app in the browser ( convienient), but the end product will not be a browser based app, it will be a native app. This tells me I need to use the Kratos endpoints for the api, for example:
To enable fast development I would like to test in the browser, so currently this is happening:
I guess to fix it, something like this should be happening:
Is the above picture the purpose of Ory Proxy or rather OAuthkeeper? Like explained here: https://www.ory.sh/kratos/docs/next/guides/zero-trust-iap-proxy-identity-access-proxy/
Hi @User Yes you will be calling different endpoints for a native application and also since you aren't using the browser won't be getting a session cookie but instead a session token. You can check out this guide https://www.ory.sh/docs/start-building/native-mobile-app Also do not confuse Oathkeeper with the Ory Cli proxy. They aren't the same tool, as Oathkeeper is a decision proxy and the Ory cli proxy is for running against the Ory Cloud.
👍 1