[ios] Switched OSM Oauth to using a link

Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
Yannik Bloscheck
2025-06-24 16:39:25 +02:00
committed by Konstantin Pastbin
parent 126d4f6373
commit 090b7c21fc
11 changed files with 98 additions and 25 deletions

23
iphone/Maps/Bridging.mm Normal file
View File

@@ -0,0 +1,23 @@
#import "Bridging.h"
#include "base/logging.hpp"
#include "editor/server_api.hpp"
#include "platform/platform.hpp"
#include "private.h"
#import "MWMAuthorizationCommon.h"
using namespace osm;
@implementation Bridging
+ (void)saveOauthTokenFrom:(NSString * _Nonnull)oauthCode
{
NSString *oauthToken = @(OsmOAuth::ServerAuth().FinishAuthorization([oauthCode UTF8String]).c_str());
OsmOAuth::ServerAuth().SetAuthToken([oauthToken UTF8String]);
osm_auth_ios::AuthorizationStoreCredentials([oauthToken UTF8String]);
}
@end