Hi, I'm working on a data sourcing app based on Quick Report Template and I'm trying to set it up for public to input data through the app but not having access to all of the data on the back end as some of it may be sensitive. I'll setup a "View" for the lalyer separately.
I've hard coded the user name and pass per suggestion here: Using FeatureServiceManager
The problem is the "Log In"(Serverr Dialog) window still pops up asking for User Name and Password(the first time app is used). Although clicking "Sign In" proceeds to wrok, it would still be confusing to users.
Is there a way to skip it completely?
What is the best strategy to pursue?
Best I could tell it gets triggered because the app can't find the generated token(the first time it is run).
I tried generating token at startup but the dialog is still being triggered.
Is there a way to somehow force it to proceed as if "Sign In" was clicked? Instead of waiting for user input. Or make it invisible?
I'm using App Studio 4.
Any advice is much appreciated.
Jon
GIS Student
Solved! Go to Solution.
That logic would be in QuickReport/QuickReportApp.qml around line ~1170. This is where it is checking if we are getting error 499 (token required for secured feature layer) on initialization then showing the login screen which is "serverDialog.visible= true"
Hey Jon
I agree with your assessment and would also like to know how to do this.
I was even thinking if there were some way to modify the login window so that the 'username' and 'password' text boxes are removed and there's just a single button for sign in.
Cheers,
Orlo
Hi Orlo,
I thought of changing the dialog but it looks like "Server Dialog" is used in multiple instances so wasn't sure if it would affect too much of the app.
I'll keep it in mind, in case I can't figure a workaround but I'll try to come up with a cleaner mod.
Hey Jonce,
Sounds good. Let me know how you get on.
Cheers,
Orlo
That logic would be in QuickReport/QuickReportApp.qml around line ~1170. This is where it is checking if we are getting error 499 (token required for secured feature layer) on initialization then showing the login screen which is "serverDialog.visible= true"
Thank you Erwin.
This is a great starting point for me. I'll try to substitute the code to generate token into
So far I've tried to comment out all actions out of the error=499 "else if" statement(line 1171) expecting that the app will just hang at that action but the dialog still shows up.
I've found a nearly identical 'else if' statement around the line 1929, maybe that needs a mod as well? I'll look into both of them further.
Awesome!
Generating the token at the E=499 statement around line 1929 seems to do the trick.
Thank you Erwin for your direction. I've wasted a lot of time on this.