diff --git a/CHANGELOG.md b/CHANGELOG.md
index abcb3298..a81e264f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
+- Fix issue where Slack user connection error message is sometimes shown despite successful connection by @joeyorlando ([#3327](https://github.com/grafana/oncall/pull/3327))
- Forward headers for Amazon SNS when organizations are moved @mderynck ([#3326](https://github.com/grafana/oncall/pull/3326))
## v1.3.57 (2023-11-10)
diff --git a/engine/apps/social_auth/pipeline.py b/engine/apps/social_auth/pipeline.py
index 10acb47d..6eb6c621 100644
--- a/engine/apps/social_auth/pipeline.py
+++ b/engine/apps/social_auth/pipeline.py
@@ -57,6 +57,11 @@ def connect_user_to_slack(response, backend, strategy, user, organization, *args
strategy.session[REDIRECT_FIELD_NAME] = url
return HttpResponse(status=status.HTTP_400_BAD_REQUEST)
+ # at this point everything is correct and we can create the SlackUserIdentity
+ # be sure to clear any pre-existing sessions, in case the user previously enecountered errors we want
+ # to be sure to clear these so they do not see them again
+ strategy.session.flush()
+
slack_user_identity, _ = SlackUserIdentity.objects.get_or_create(
slack_id=slack_user_id,
slack_team_identity=slack_team_identity,
diff --git a/grafana-plugin/src/containers/MobileAppConnection/MobileAppConnection.tsx b/grafana-plugin/src/containers/MobileAppConnection/MobileAppConnection.tsx
index 4e87938f..b1ae577a 100644
--- a/grafana-plugin/src/containers/MobileAppConnection/MobileAppConnection.tsx
+++ b/grafana-plugin/src/containers/MobileAppConnection/MobileAppConnection.tsx
@@ -152,7 +152,8 @@ const MobileAppConnection = observer(({ userPk }: Props) => {
App connected
- You can sync one application to your account. To setup new device please disconnect app first.
+ You can only sync one application to your account. To setup a new device, please disconnect the currently
+ connected device first.
@@ -168,7 +169,9 @@ const MobileAppConnection = observer(({ userPk }: Props) => {
Sign In
- Open Grafana IRM mobile application and scan this code to sync it with your account.
+
+ Open the Grafana IRM mobile application and scan this code to sync it with your account.
+
{isQRBlurry && }
diff --git a/grafana-plugin/src/containers/MobileAppConnection/__snapshots__/MobileAppConnection.test.tsx.snap b/grafana-plugin/src/containers/MobileAppConnection/__snapshots__/MobileAppConnection.test.tsx.snap
index 1f46a2a3..74d48e6f 100644
--- a/grafana-plugin/src/containers/MobileAppConnection/__snapshots__/MobileAppConnection.test.tsx.snap
+++ b/grafana-plugin/src/containers/MobileAppConnection/__snapshots__/MobileAppConnection.test.tsx.snap
@@ -120,7 +120,7 @@ exports[`MobileAppConnection if we disconnect the app, it disconnects and fetche
- Open Grafana IRM mobile application and scan this code to sync it with your account.
+ Open the Grafana IRM mobile application and scan this code to sync it with your account.
- You can sync one application to your account. To setup new device please disconnect app first.
+ You can only sync one application to your account. To setup a new device, please disconnect the currently connected device first.