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

fix(MobileClient): Fixing a crash when attempting to use HostedUI #5316

Merged
merged 2 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions AWSCognitoAuth/AWSCognitoAuth.m
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,9 @@ - (void)launchLegacySession:(NSURL *)url

- (void)launchSFWebAuthenticationSession:(NSURL *)hostedUIURL API_AVAILABLE(ios(11.0)) {
self.sfAuthenticationSessionAvailable = YES;
NSString *callbackURLScheme = [[self urlEncode:self.authConfiguration.signInRedirectUri] copy];
NSString *callbackURLString = [[self urlEncode:self.authConfiguration.signInRedirectUri] copy];
NSURL *callbackURL = [[NSURL alloc] initWithString:callbackURLString];
NSString *callbackURLScheme = callbackURL.scheme;
__weak AWSCognitoAuth *weakSelf = self;
self.sfAuthSession = [[ASWebAuthenticationSession alloc] initWithURL:hostedUIURL
callbackURLScheme:callbackURLScheme
Expand Down Expand Up @@ -655,7 +657,9 @@ - (void)launchLegacySessionForSignOut:(NSURL *) url

- (void)launchSFAuthenticationSessionForSignOut:(NSURL *) url API_AVAILABLE(ios(11.0)) {
self.sfAuthenticationSessionAvailable = YES;
NSString *callbackURLScheme = [[self urlEncode:self.authConfiguration.signOutRedirectUri] copy];
NSString *callbackURLString = [[self urlEncode:self.authConfiguration.signOutRedirectUri] copy];
NSURL *callbackURL = [[NSURL alloc] initWithString:callbackURLString];
NSString *callbackURLScheme = callbackURL.scheme;
__weak AWSCognitoAuth *weakSelf = self;
self.sfAuthSession = [[ASWebAuthenticationSession alloc] initWithURL:url
callbackURLScheme:callbackURLScheme
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

## Unreleased

-Features for next release
### Bug Fixes

- **AWSMobileClient**
- Fixing a crash when attempting to use HostedUI (#5316)

## 2.36.0

Expand Down
Loading