Authentication not working with other data sources
I was working on a second data source and branch on our authentication flow and kept getting this issue
Whoops! An error occurred.
Exception: Invalid authentication token.
I decided to try on the live data source and it works
I also tried with postman and when using the live data source it works, but when I change the data source
{
"code": "ERROR_CODE_UNAUTHORIZED",
"message": "This authentication token belongs to a different datasource."
}
Just to make sure is not an issue I created a new workspace with the default user name and password authentication, no logic change , just default xano auto generated functions and still the same happens on the brand new workspace with the v1 branch and test source data
This is big issue for developing as we would have to start turning off and on authentications.
Best Answer
-
I was able to figure out the bug , we had name the datasource staging_dev and that created the issue, I assume is the underscore.
Once I deleted and created the datasource as just dev it worked, and I also did the test back and forward on a blank workspace and it always worked with dev and failed with staging_dev
Answers
-
Just to add I tested both endpoints login and me on both data points, so when trying to validate on the test data source I indeed created the token with the test data source and a differnt password just to make sure.
-
Thanks for sharing the solution, @pablovelasquez! 🙏
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback