onApiError custom error page

I made the setting to make a custom error page, but when the error occurs, the /api/auth/error page still works, is there something I forgot to do about it?
No description
23 Replies
Furkan Özay
Furkan ÖzayOP5w ago
no one knows anything about this? @Ping can you help me ?
Ping
Ping5w ago
Which method are you calling which creates the error?
Furkan Özay
Furkan ÖzayOP5w ago
I tested something like this, after logging in with google, I press the back button from the browser and select the account again, an error occurs here, it is normal for an error to occur, actually a state error occurs, but I am having trouble designing a custom error page. @Ping
Ping
Ping5w ago
If you're using oauth, could you try passing the error callback url here instead?
No description
Furkan Özay
Furkan ÖzayOP5w ago
I'm using auth.api 😦 @Ping
Ping
Ping5w ago
No description
Furkan Özay
Furkan ÖzayOP5w ago
thanks unfortunately it didn't work it still redirects to api/auth/error @Ping
Ping
Ping5w ago
What does the error message say?
Furkan Özay
Furkan ÖzayOP5w ago
@Ping
No description
Ping
Ping5w ago
Hmm, not sure. Bekacru might know why you're getting this though. Sorry I couldn't help.
Furkan Özay
Furkan ÖzayOP5w ago
thank you, what do you think the reason could be ? @bekacru
bekacru
bekacru5w ago
is this when you try to use the sso plugin?
Furkan Özay
Furkan ÖzayOP5w ago
no, it's a weird bug that my client encountered when using google login, it's actually normal to give an error, but I want to customize the page The error occurs as follows: log in with google, then press the back button from the browser, then select the account again and proceed, you encounter a state error @bekacru
bekacru
bekacru5w ago
Oh then it should redirect properly if you provided errorIRL Im not sure why it's not the case. But just checked on my side and it does work.
Furkan Özay
Furkan ÖzayOP5w ago
I don't know :/ @bekacru
No description
Ping
Ping5w ago
I'm not sure if you're meant to pass the redirect res.url
rhitune
rhitune4w ago
cözdün mü
Furkan Özay
Furkan ÖzayOP3w ago
@Ping I think the problem occurs when there is no ApiError, instead I defined a route called /api/auth/error and made a custom page myself, is this a wrong approach?
No description
Furkan Özay
Furkan ÖzayOP3w ago
@bekacru Does this cause any problems?
bekacru
bekacru3w ago
this is fine. but I think someone else also reported this as an issue. Will be fixed!
SxYxuse
SxYxuse3w ago
@Furkan Özay does your onAPIError works ? The log work when an api error is thrown somewhere ?
Furkan Özay
Furkan ÖzayOP3w ago
No, no matter what I did, I couldn't get it to work. @SxYxuse
SxYxuse
SxYxuse3w ago
Okay, me too https://discord.com/channels/1288403910284935179/1359464868239114331 Will be great when fixed by @bekacru

Did you find this page helpful?