Skip to content

Commit

Permalink
chore(): Prepare release 4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
moberwasserlechner committed Apr 11, 2023
1 parent 66eaf4e commit 1114614
Show file tree
Hide file tree
Showing 6 changed files with 1,652 additions and 1,582 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## [4.0.1] - 2023-04-11

### Fixed

* Android: Additional `id_token` argument for logout method [#192](https://github.com/moberwasserlechner/capacitor-oauth2/issues/233). Thank you [@svzi](https://github.com/svzi)

### Chore

* Update dev dependencies

## [4.0.0] - 2022-09-18

### Fixed
Expand Down Expand Up @@ -123,7 +133,8 @@ This is controlled by Android specific parameters `handleResultOnNewIntent` for
- Android: Fix Java compiler error #36 (thx @Anthbs)
- Fix github security error by updating Jest lib

[Unreleased]: https://github.com/moberwasserlechner/capacitor-oauth2/compare/4.0.0...main
[Unreleased]: https://github.com/moberwasserlechner/capacitor-oauth2/compare/4.0.1...main
[4.0.1]: https://github.com/moberwasserlechner/capacitor-oauth2/compare/4.0.0...4.0.1
[4.0.0]: https://github.com/moberwasserlechner/capacitor-oauth2/compare/3.0.1...4.0.0
[3.0.1]: https://github.com/moberwasserlechner/capacitor-oauth2/compare/3.0.0...3.0.1
[3.0.0]: https://github.com/moberwasserlechner/capacitor-oauth2/compare/2.1.0...3.0.0
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Michael Oberwasserlechner
Copyright (c) 2023 Michael Oberwasserlechner

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Capacitor OAuth 2 client plugin

<a href="#sponsors"><img src="https://img.shields.io/badge/plugin-Sponsors-blue?style=flat-square" /></a>
<a href="https://github.com/moberwasserlechner/capacitor-oauth2/actions?query=workflow%3ACI"><img src="https://img.shields.io/github/workflow/status/moberwasserlechner/capacitor-oauth2/CI?style=flat-square" /></a>
<a href="https://github.com/moberwasserlechner/capacitor-oauth2/actions/workflows/ci.yml"><img src="https://github.com/moberwasserlechner/capacitor-oauth2/actions/workflows/ci.yml/badge.svg?branch=main" /></a>
<a href="https://www.npmjs.com/package/@byteowls/capacitor-oauth2"><img src="https://img.shields.io/npm/dw/@byteowls/capacitor-oauth2?style=flat-square" /></a>
<a href="https://www.npmjs.com/package/@byteowls/capacitor-oauth2"><img src="https://img.shields.io/npm/v/@byteowls/capacitor-oauth2?style=flat-square" /></a>
<a href="LICENSE"><img src="https://img.shields.io/npm/l/@byteowls/capacitor-oauth2?style=flat-square" /></a>
Expand Down Expand Up @@ -301,7 +301,7 @@ On Android the plugin is registered **automatically** by Capacitor.

### Android Default Config

Skip this, if you use a [OAuth2CustomHandler](#custom-oauth-handler)
Skip this, if you use a `OAuth2CustomHandler`. See below.

#### android/app/src/main/res/AndroidManifest.xml

Expand Down Expand Up @@ -363,17 +363,21 @@ android.buildTypes.release.manifestPlaceholders = [
```

2) "ERR_ANDROID_RESULT_NULL": See [Issue #52](https://github.com/moberwasserlechner/capacitor-oauth2/issues/52#issuecomment-525715515) for details.
I cannot reproduce this behaviour. Moreover there might be situation this state is valid. In other cases e.g. in the linked issue a configuration tweak fixed it.
I cannot reproduce this behaviour. Moreover, there might be situation this state is valid. In other cases e.g. in the linked issue a configuration tweak fixed it.

3) To prevent some logout issues on certain OAuth2 providers (like Salesforce for example), you should provide the `id_token` parameter on the `logout(...)` function.
This ensures that not only the cookies are deleted, but also the logout link is called from the OAuth2 provider.
Also, it uses the system browser that the plugin uses (and not the user's default browser) to call the logout URL.
This additionally ensures that the cookies are deleted in the correct browser.

3) To prevent some logout issues on certain OAuth2 providers (like Salesforce for example), you should provide the `id_token` parameter on the `logout(...)` function. This ensures that not only the cookies are deleted, but also the logout link is called from the Oauth2 provider. Also, it uses the system browser that the plugin uses (and not the user's default browser) to call the logout URL. This additionally ensures that the cookies are deleted in the correct browser.

### Custom OAuth Handler

Some OAuth provider (Facebook) force developers to use their SDK on Android.

This plugin should be as generic as possible so I don't want to include provider specific dependencies.

Therefore I created a mechanism which let developers integrate custom SDK features in this plugin.
Therefore, I created a mechanism which let developers integrate custom SDK features in this plugin.
Simply configure a full qualified classname in the option property `android.customHandlerClass`.
This class has to implement `com.byteowls.capacitor.oauth2.handler.OAuth2CustomHandler`.

Expand All @@ -386,7 +390,7 @@ On iOS the plugin is registered **automatically** by Capacitor.

### iOS Default Config

Skip this, if you use a [OAuth2CustomHandler](#custom-oauth-handler-1)
Skip this, if you use a `OAuth2CustomHandler`. See below.

Open `ios/App/App/Info.plist` in XCode (Context menu -> Open as -> Source) and add the value of `redirectUrl` from your config without `:/` like that

Expand Down
11 changes: 0 additions & 11 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
module.exports = {
preset: 'ts-jest',
verbose: true,
// transformIgnorePatterns: [
// "node_modules/(?!(@capacitor))"
// ],
// moduleNameMapper: {
// // '^@capacitor/core$': '<rootDir>/node_modules/@capacitor/core/dist/esm/index.js',
// // '^@capacitor/core$': '<rootDir>/node_modules/@capacitor/core/dist/capacitor.js',
//
// },
// transform: {
// "^.+\\.(ts|tsx)$": "ts-jest"
// },
testEnvironment: 'node',
globals: {
window: {}
Expand Down
Loading

0 comments on commit 1114614

Please sign in to comment.