Back

Error 401 by using custom domain on cloud. _APP_OPTIONS_ROUTER_PROTECTION

  • 0
  • Flutter
  • Cloud
Drake
23 Sep, 2023, 02:41

It's only needed for web apps that need first party cookies

TL;DR
Error 401 occurred when using a custom domain on the cloud. A solution is to update the application to use the cloud domain and set up Google Console Service Auth to the cloud URL as well.
fernandoxlr
23 Sep, 2023, 02:41

Hmm

fernandoxlr
23 Sep, 2023, 02:42

So the only way now is updating the application to use the cloud domain, and setup Google Console Service Auth to the cloud url as well

Drake
23 Sep, 2023, 02:44

What do you mean by Google console service auth?

fernandoxlr
23 Sep, 2023, 02:51

I'm sorry, I didn't say the proper name. I meant I will have to update the redirect url of the Google OAuth2 to use the new url with appwrite cloud domain.

fernandoxlr
23 Sep, 2023, 02:51

And update the app changing the server url

fernandoxlr
23 Sep, 2023, 02:51

Because I had done everything using custom domain

Drake
23 Sep, 2023, 02:52

Yes. I wonder if it'll work if you just update that redirect url and not the app 🧐

Btw I have raised this to the team

fernandoxlr
23 Sep, 2023, 02:52

Hmmm, good idea, I can try now

fernandoxlr
23 Sep, 2023, 03:00

The app that tells the redirect url. The only way to change the redirect url domain was by changing the client endpoint in the app

fernandoxlr
23 Sep, 2023, 03:02

After change I could login.

Drake
23 Sep, 2023, 03:02

The change in the app code you mean?

fernandoxlr
23 Sep, 2023, 03:02

Yes

Drake
23 Sep, 2023, 03:02

Womp. Like I said, I brought this up to the team. You should definitely start switching the endpoint though.

fernandoxlr
23 Sep, 2023, 03:03

Ok. I'll do this weekend. It was a bad surprise haha

fernandoxlr
23 Sep, 2023, 03:04

It would be nice to have a warning on the announcement about the cloud upgrade and this issue.

Drake
23 Sep, 2023, 03:04

I can imagine. Sorry about that

fernandoxlr
23 Sep, 2023, 03:04

No problem. Thank you for the help.

Drake
23 Sep, 2023, 03:04

I don't think we expected it to affect apps

fernandoxlr
23 Sep, 2023, 03:09

So many updates haha. I know the cloud status is BETA, so I am aware that these things can happen. No problem.

Meldiron
24 Sep, 2023, 07:51

Hey there πŸ‘‹ We discussed this issue internally and we plan to make a patch for this on Cloud early next week.

fernandoxlr
29 Sep, 2023, 18:39

Thank you @Meldiron . So will custom domain work as before?

Drake
29 Sep, 2023, 18:42

yes i believe it should work now

fernandoxlr
29 Sep, 2023, 18:48

Oh yes, it worked. Thank you, guys!!

Drake
30 Sep, 2023, 00:28

Thank you for your patience!

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more