Skip to content
This repository has been archived by the owner on Jan 26, 2025. It is now read-only.

chore(typescript): Add better TypeScript definitions for Angular #116

Closed
wants to merge 5 commits into from
Closed

chore(typescript): Add better TypeScript definitions for Angular #116

wants to merge 5 commits into from

Conversation

cmckni3
Copy link

@cmckni3 cmckni3 commented Feb 2, 2018

No description provided.

return this.oktaAuth;
}

/**
* Checks if there is a current accessToken in the TokenManager.
*/
isAuthenticated() {
isAuthenticated(): boolean {
return !!this.oktaAuth.tokenManager.get('accessToken');
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what the type definitions of getAccessToken and getIdToken should be. Does @okta/okta-auth-js contain a structure for it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like #115 corrects it.

@cmckni3 cmckni3 changed the base branch from master to 1.0.0-angular February 21, 2018 18:21
Copy link
Contributor

@jmelberg-okta jmelberg-okta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking on this task! 👊

Overall its looking pretty good! One simple ask - In our testing sample, can you make sure to reflect these changes under test/e2e/harness/src/app/app.module.ts? Then, verify this works by running npm start and/or npm test from the okta-angular directory. Thanks again!

@@ -1,6 +1,6 @@
{
"name": "@okta/okta-react",
"version": "0.0.11",
"version": "0.0.12",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since these versions are updated by our publishing script, can we make sure to revert this back before merging?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. I had branched from master so there was an extra commit.

@@ -0,0 +1,5 @@
import { Router } from '@angular/router';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add the license banner to this file? An example is available here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@cmckni3
Copy link
Author

cmckni3 commented Mar 1, 2018

Got it. Had to fix the type of onAuthRequired in the test harness app.module.ts.

npm start looks good on my end. npm test times out.

Copy link
Contributor

@jmelberg-okta jmelberg-okta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cmckni3!

My guess is npm test is failing because it is looking for specific environment variables. I was able to pull down your recent changes and can verify the tests pass. I've got a follow-up task to ensure we have proper documentation around this. Sorry about that!

Overall - everything looks good on my end. I'm tagging in @robertjd for one last look before we get this merged in.

@cmckni3
Copy link
Author

cmckni3 commented Mar 1, 2018

sweet. Thanks, @jmelberg-okta!

@jmelberg-okta
Copy link
Contributor

Closing in favor of #155 (containing these changes by @cmckni3)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants