Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nativescript 7.x support #125

Closed
wants to merge 15 commits into from
Closed

Nativescript 7.x support #125

wants to merge 15 commits into from

Conversation

funder7
Copy link

@funder7 funder7 commented Jul 16, 2020

What is the current behavior?

The plugin is not usable inside a NativeScript project using Angular version >= 9

What is the new behavior?

Dependencies have been updated in order to make the project compatible with [email protected]. Apparently this ts version is required to allow the import inside a Nativescript-Angular project which is using the new Ivy compiler since angular@9

Important notes

  • This code has been included, built, and run into an existing NS project. At runtime it showed some warnings, but all errors were solved.
  • Test configuration must be updated in order to make tests runnable again, don't mark this code as "stable" before enabling tests again.
  • This change: qsObj["code"] --> qsObj.code.toString() has been tested on Android and works, by the way some tests would be a nice to have.

Fixes #124 .
Fixes #114 .

funder7 and others added 12 commits April 6, 2020 14:21
- Compiled with typescript@~3.9.2
- Fixed issue reported by tsc on querystring
- tns-core-modules & platform-declarations updated
- added @types/node
- *.iml (idea) project files ignored
In my case, the signature hash, and thus the redirect Uri, contains an `=`. It is already encoded into `%3D` when I copy it from the Azure Portal, but it has to be passed as `%253D` when passing it into the HTTP request method, because somewhere along the line it is decoded and won't come across correctly.

The error I got was that the redirect_uri didn't match the one from the Azure Portal. After this change, it worked as expected.
- Compiled with typescript@~3.9.2
- Fixed issue reported by tsc on querystring
- tns-core-modules & platform-declarations updated
- added @types/node
- *.iml (idea) project files ignored
…ativescript-oauth2 into feature/nativescript-7-support
https://www.npmjs.com/package/tns-core-modules

"The tns-core-modules package exists only for compatibility with older versions of NativeScript. It's recommended to use @nativescript/core now."

Using @nativescript/core in plugin and all sample projects
tns-core-modules to @nativescript/core migration needs some updates in the import syntax
@alexziskind1
Copy link
Owner

@funder7 thanks for the PR. is this backwards compatible with ns6?

@funder7
Copy link
Author

funder7 commented Jul 22, 2020

Hi @alexziskind1 actually this version is compatible with ns6, I made some confusion with versions :-)

I think that it's safer to merge this into a new branch, instead of master directly... Now I'm using it on Android, but I've got no chance to test in on iOS!

Some ns modules have been updated in the meanwhile, I'm going to test & commit the update.

We could name this version 2.5.0-rc.0, then once N team releases stable modules, this can be consolidated and released too.
What do you think about it?

@funder7 funder7 changed the title Feature/nativescript 7 support Feature/nativescript 6 support Jul 22, 2020
@funder7 funder7 changed the title Feature/nativescript 6 support Nativescript 6.x support Jul 22, 2020
- update: @nativescript/core rc.21→rc.24
- using @nativescript/types references
- added -rc.x prefix to module version
- clean script removes js & map
- {N} platform version updated to 6.0.0
src/package.json Outdated
@@ -1,13 +1,13 @@
{
"name": "nativescript-oauth2",
"version": "2.5.0",
"version": "2.5.0-rc.0",
Copy link
Author

Choose a reason for hiding this comment

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

@nativescript/core and types are not released as stable yet, I would follow that naming to let the user know about upcoming updates, once stable packages are released

@bastienlemaitre
Copy link

@funder7 funder7 changed the title Nativescript 6.x support Nativescript 7.x support Sep 2, 2020
@alexziskind1
Copy link
Owner

Thanks for the PR. I'm going to close this out as I've done the update separately on a live stream so more folks could benefit (i hope). But I appreciate your contribution

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

Successfully merging this pull request may close these issues.

Support for next nativescript release Warning: topmost() is deprecated. Use Frame.topmost() instead.
4 participants