File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15+ import { CorePlatform } from '@services/platform' ;
1516import { CoreCustomURLSchemes } from '@services/urlschemes' ;
1617import { NgZone } from '@singletons' ;
1718import { CoreEvents } from '@singletons/events' ;
19+ import { CoreUrl } from '@singletons/url' ;
1820
1921/**
2022 * Asynchronous function to handle custom URLs when the app is launched.
@@ -46,4 +48,17 @@ export default async function(): Promise<void> {
4648 } ) ;
4749 } ) ;
4850 } ;
51+
52+ // Allow launching the app with a deep link in web app.
53+ const searchParams = new URLSearchParams ( window . location . search ) ;
54+
55+ await CorePlatform . ready ( ) ;
56+
57+ if ( ! CorePlatform . isMobile ( ) ) {
58+ const url = searchParams . get ( 'webAppDeepLink' ) ;
59+ if ( url ) {
60+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
61+ ( < any > window ) . handleOpenURL ( CoreUrl . decodeURIComponent ( url ) ) ;
62+ }
63+ }
4964}
Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ export class CoreCustomURLSchemesProvider {
298298 siteUrl : url ,
299299 username : username ,
300300 token : params . token ,
301- privateToken : params . privateToken ,
301+ privateToken : params . privateToken || params . privatetoken ,
302302 redirect : params . redirect ,
303303 isAuthenticationURL : ! ! params . token ,
304304 } ;
You can’t perform that action at this time.
0 commit comments