ory / examples

A curated collection of examples and solutions created and maintained by the Ory Community.
https://www.ory.sh/community/
Apache License 2.0
135 stars 67 forks source link

WIP: Refresh a supabase example #60

Open drev74 opened 1 year ago

drev74 commented 1 year ago

Related Issue or Design Document

I'm trying to reproduce kratos-keto-oathkeeper-supabase without bumping ory deps. I've simplified the compose by removing redundant postgres versions.

However, I can't make it work having an issue with keto-perms:

time=2022-11-24T19:42:39Z level=debug msg=Ignoring migration file 20150100000001000000_networks.sqlite3.down.sql because dialect is not supported: unsupported
 dialect sqlite3 audience=application service_name=ORY Keto service_version=v0.7.0-alpha.1                                                                    
time=2022-11-24T19:42:39Z level=debug msg=Ignoring migration file 20150100000001000000_networks.sqlite3.up.sql because dialect is not supported: unsupported d
ialect sqlite3 audience=application service_name=ORY Keto service_version=v0.7.0-alpha.1                                                             
Migrations were not applied yet, please apply them first.% 

Original impl doesn't work for me as well.

Could anyone pls help me to reproduce the example?

Checklist

Further comments

CLAassistant commented 1 year ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: drev74
:x: tetra12
You have signed the CLA already but the status is still pending? Let us recheck it.

vinckr commented 1 year ago

Hey, thanks for looking into it! The example probably needs a good updating.. I will see to look into this PR and see if I can reproduce this week :)

drev74 commented 1 year ago

Guten tag @vinckr

WIP in PR stands for Work-in-Progress :eyes: . I've not yet finished. Now updating a client. I'll remove the WIP and ping you when I'm ready

Vielen dank :sunglasses:

drev74 commented 1 year ago

@vinckr has smth changed recently? I can't instantiate an Ory Agent with:

const ory = new V0alpha2Api(...) error - V0alpha2Api is not found

Switched to ory/client v1.0.1

vinckr commented 1 year ago

@drev74 yes the syntax has changed a bit,

const ory = {
- v0alpha2: V0alpha2Api
+ identity: new IdentityApi(config)
+ frontend: new FrontendApi(config),
+ oauth2: new OAuth2Api(config),
}

see the upgrade guide: https://www.ory.sh/docs/guides/upgrade/sdk-v1

its pretty new, so any feedback appreciated 🙏 we are also working on more docs

drev74 commented 1 year ago

@vinckr Could you pls help me a bit :eyes: . I'm trying to implement a login-logout for a Vite Client here.

I added an allowed return URL for kratos here However, when I press Logout I'm getting this:

{
  "code": 403,
  "reason": "Unable to log out because the logout token in the URL query does not match the session cookie.",
  "status": "Forbidden",
  "message": "The requested action was forbidden"
}

Any ideas :thinking:

PS: I see a major bump to ORY v1. I'll try to bump all my stuff and try again :roll_eyes: PPS: Fixed after bump :sunglasses: