Skip to content

Commit 558cc3e

Browse files
VK IDplayer-man
authored andcommitted
Release v2.8.0-alpha
1 parent 9b4f5fc commit 558cc3e

File tree

1,036 files changed

+1159
-1085
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,036 files changed

+1159
-1085
lines changed

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
> **Note**\
44
> Описание основных изменений в релизах VK ID SDK. Наш SDK следует [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5-
## 2.7.1 - 2025-09-11
5+
## 2.7.1 - 2025-09-10
66

77
### Changed
88
+ ВКонтакте переходит на домен vk.ru — теперь все API-интеграции и авторизации будут доступны только через него.
9-
109
## 2.7.0 - 2025-07-09
1110

1211
### Added

VKID.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = "VKID"
3-
spec.version = "2.7.1"
3+
spec.version = "2.8.0-alpha"
44
spec.summary = "iOS library for VK ID authorization"
55
spec.homepage = "https://id.vk.ru/business"
66
spec.authors = { 'VK ID' => '[email protected]' }
@@ -39,7 +39,7 @@ THIRD PARTIES FOR ANY DAMAGE IN CONNECTION WITH USE OF THE SOFTWARE.
3939
spec.source_files = "VKID/Sources/**/*.swift"
4040
spec.static_framework = true
4141
spec.dependency 'VKIDCore', "#{spec.version}"
42-
spec.dependency 'VKCaptchaSDK', '0.1.1'
42+
spec.dependency 'VKCaptchaSDK', '0.1.2'
4343

4444
spec.resource_bundles = {
4545
'VKID-Resources' => ['VKID/Sources/Resources/*.{xcassets,lproj,txt,xcprivacy,xcstrings}']

VKID/Sources/AuthFlow/Common/AuthURLBuilder.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ internal protocol AuthURLBuilder {
4848
credentials: AppCredentials,
4949
scope: String?,
5050
deviceId: String,
51-
appearance: Appearance
51+
appearance: Appearance,
52+
prompt: String
5253
) throws -> URL
5354
}
5455

@@ -102,7 +103,8 @@ internal final class AuthURLBuilderImpl: AuthURLBuilder {
102103
credentials: AppCredentials,
103104
scope: String?,
104105
deviceId: String,
105-
appearance: Appearance
106+
appearance: Appearance,
107+
prompt: String
106108
) throws -> URL {
107109
guard let codeChallengeMethod = (try? secrets.codeChallengeMethod.rawValue) else {
108110
throw AuthFlowError.authOverdue
@@ -112,7 +114,7 @@ internal final class AuthURLBuilderImpl: AuthURLBuilder {
112114
.provider(oAuth: oAuthProvider),
113115
.codeChallengeMethod(codeChallengeMethod),
114116
.deviceId(deviceId),
115-
.prompt("login"),
117+
.prompt(prompt),
116118
.oAuthVersion,
117119
.version(Env.VKIDVersion),
118120
.scope(scope ?? ""),

VKID/Sources/AuthFlow/ExtendedAuthConfiguration.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ struct ExtendedAuthConfiguration {
3535
let scope: String?
3636
let forceWebViewFlow: Bool
3737
let groupSubscriptionConfiguration: GroupSubscriptionConfiguration?
38+
let prompt: String
3839
}

VKID/Sources/AuthFlow/WebView/WebViewAuthFlow.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ internal final class WebViewAuthFlow: Component, AuthFlow {
6969
credentials: self.deps.appCredentials,
7070
scope: self.deps.authConfig.scope,
7171
deviceId: self.deps.deviceId.description,
72-
appearance: self.deps.appearance
72+
appearance: self.deps.appearance,
73+
prompt: self.deps.authConfig.prompt
7374
)
7475
self.authInWebView(
7576
with: presenter,

VKID/Sources/Core/AuthConfiguration/AuthConfiguration.swift

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,27 @@
2828

2929
import Foundation
3030

31+
/// Параметр позволяет изменить флоу прохождения авторизации. [Подробнее](https://id.vk.ru/about/business/go/docs/ru/vkid/latest/vk-id/connection/api-description#Optional-parameters-authorize)
32+
public enum Prompt {
33+
/// Процесс всегда стартует с аутентификации пользователя, даже если он уже вошёл в VK ID.
34+
case login
35+
/// Процесс авторизации без взаимодействия с пользователем.
36+
case none
37+
/// Всегда отображается форма запроса разрешений доступов, даже если пользователь давал их ранее.
38+
case consent
39+
/// Можно указать несколько значений через пробел.
40+
/// Пустое значение или отсутствие параметра — форма входа появляется, если пользователь ещё не вошёл в VK ID. Форма разрешения доступов отображается, если ранее пользователь ещё не разрешал доступ к данным.
41+
case custom(String?)
42+
internal var value: String {
43+
return switch self {
44+
case .login: "login"
45+
case .custom(let value): value ?? ""
46+
case .none: "none"
47+
case .consent: "consent"
48+
}
49+
}
50+
}
51+
3152
/// Определяет основные параметры авторизации
3253
public struct AuthConfiguration {
3354
let scope: Scope?
@@ -38,6 +59,9 @@ public struct AuthConfiguration {
3859
/// Запускает флоу авторизации только в браузере, открывающемся с помощью SDK. Если значение 'true', то будет проигнорирован флоу авторизации через провайдера авторизации. Следует с осторожностью использовать эту настройку, так как выключение авторизации через провайдер может резко снизить конверсию.
3960
let forceWebViewFlow: Bool
4061

62+
/// Параметр позволяет изменить флоу прохождения авторизации.
63+
let prompt: Prompt
64+
4165
public internal(set) var groupSubscriptionConfiguration: GroupSubscriptionConfiguration?
4266

4367
/// Создает конфигурацию авторизации
@@ -48,12 +72,16 @@ public struct AuthConfiguration {
4872
/// Запрошенный список прав для приложения не может быть больше, чем разрешенный список в [настройках приложения](https://id.vk.ru/about/business/go/docs/ru/vkid/latest/vk-id/connection/application-settings)
4973
/// По умолчанию scope = nil, в этом случае будет выдано базовое право доступа `vkid.personal_info`.
5074
/// - forceWebViewFlow: Запуск авторизации только в браузере.
75+
/// - groupSubscriptionConfiguration: настройка подписки на сообщество. По умолчанию nil.
76+
/// - prompt: Параметр позволяет изменить флоу прохождения авторизации. По умолчанию .login.
5177
public init (
5278
flow: Flow = .publicClientFlow(),
5379
scope: Scope? = nil,
5480
forceWebViewFlow: Bool = false,
55-
groupSubscriptionConfiguration: GroupSubscriptionConfiguration? = nil
81+
groupSubscriptionConfiguration: GroupSubscriptionConfiguration? = nil,
82+
prompt: Prompt = .login
5683
) {
84+
self.prompt = prompt
5785
self.flow = flow
5886
self.forceWebViewFlow = forceWebViewFlow
5987
self.groupSubscriptionConfiguration = groupSubscriptionConfiguration

VKID/Sources/Core/VKID.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,8 @@ public final class VKID {
303303
oAuthProvider: oAuthProviderConfig.primaryProvider,
304304
scope: authConfig.scope?.description,
305305
forceWebViewFlow: authConfig.forceWebViewFlow,
306-
groupSubscriptionConfiguration: groupConfig
306+
groupSubscriptionConfiguration: groupConfig,
307+
prompt: authConfig.prompt.value
307308
)
308309

309310
self.authorize(
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
let VKAPI_VERSION = "5.220.0"
2-
let VKID_VERSION = "2.7.1"
2+
let VKID_VERSION = "2.8.0"

VKID/Tests/AuthFlow/Common/AuthURLBuilderTests.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ final class AuthURLBuilderTests: XCTestCase {
203203
credentials: self.credentials,
204204
scope: self.scope,
205205
deviceId: DeviceId.currentDeviceId.description,
206-
appearance: appearance
206+
appearance: appearance,
207+
prompt: "login"
207208
)
208209

209210
let urlComponents = URLComponents(url: result, resolvingAgainstBaseURL: true)
@@ -285,7 +286,8 @@ final class AuthURLBuilderTests: XCTestCase {
285286
credentials: credentials,
286287
scope: self.scope,
287288
deviceId: DeviceId.currentDeviceId.description,
288-
appearance: appearance
289+
appearance: appearance,
290+
prompt: "login"
289291
)
290292

291293
let urlComponents = URLComponents(url: result, resolvingAgainstBaseURL: true)

VKIDCore.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = "VKIDCore"
3-
spec.version = "2.7.1"
3+
spec.version = "2.8.0-alpha"
44
spec.summary = "VKID core functionality. Not for public use."
55
spec.homepage = "https://id.vk.ru/business"
66
spec.authors = { 'VK ID' => '[email protected]' }
@@ -37,7 +37,7 @@ THIRD PARTIES FOR ANY DAMAGE IN CONNECTION WITH USE OF THE SOFTWARE.
3737
spec.source = { :git => "https://github.com/VKCOM/vkid-ios-sdk.git", :tag => "#{spec.version}" }
3838
spec.cocoapods_version = ">= 1.11.2"
3939
spec.static_framework = true
40-
spec.dependency 'VKCaptchaSDK', '0.1.1'
40+
spec.dependency 'VKCaptchaSDK', '0.1.2'
4141

4242
spec.source_files = "VKIDCore/Sources/**/*.swift"
4343
spec.resource_bundles = {

0 commit comments

Comments
 (0)