lcsc-capstone / lcsc-ionic-app

LCSC's new app, built by CS and Web Dev students
0 stars 1 forks source link

CredentialsProvider usage #116

Closed AustinHaugerud closed 6 years ago

AustinHaugerud commented 6 years ago

I've added a CredentialsProvider service. As I understand it the warrior web credentials are no longer needed only for the class schedule component, so rather than both of us use the secure storage api directly (which is prone to us finding bugs at runtime, i.e string literal typos), we should all adopt to using it. I'll also be adding some functionality in so that the service can report if the login failed, removing the issue where the login page will accept your credentials even if they're wrong. In the future if needed other credentials could be added to the service, such as blackboard.

After adding it your angular componenet it's as simple as something like let usernamePromise = this.credentialsProvider.getWarriorWebUsername();

I'll push this up in a few hours.

AustinHaugerud commented 6 years ago

Update: The credentials provider is on the class-schedule-enhancement branch now.