mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-06 12:34:24 +00:00
[ios] Switched OSM Oauth to using a link
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
126d4f6373
commit
090b7c21fc
23
iphone/Maps/Bridging.mm
Normal file
23
iphone/Maps/Bridging.mm
Normal 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
|
||||
Reference in New Issue
Block a user